From 8a2dfb7b5b423245974168db806b88e1241b8a23 Mon Sep 17 00:00:00 2001 From: xecarlox94 Date: Mon, 26 May 2025 00:15:36 +0100 Subject: [PATCH] fixed haskell development environment --- Bindings/Haskell/flake.lock | 94 ++++++++++++++++++++++++++++++++++++- Bindings/Haskell/flake.nix | 38 +++++++-------- 2 files changed, 111 insertions(+), 21 deletions(-) diff --git a/Bindings/Haskell/flake.lock b/Bindings/Haskell/flake.lock index dfb4f3a..71c1df5 100644 --- a/Bindings/Haskell/flake.lock +++ b/Bindings/Haskell/flake.lock @@ -18,6 +18,49 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "flake-utils": [ + "p2prc-main", + "flake-utils" + ], + "nixpkgs": [ + "p2prc-main", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745875161, + "narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 0, @@ -30,10 +73,44 @@ "type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "p2prc-main": { + "inputs": { + "flake-utils": "flake-utils_2", + "gomod2nix": "gomod2nix", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 0, + "narHash": "sha256-bQH3tqwK4eSRrJckF8wHfulBa4c5lcOIcCOiyDGUx2U=", + "path": "../../", + "type": "path" + }, + "original": { + "path": "../../", + "type": "path" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "p2prc-main": "p2prc-main" } }, "systems": { @@ -50,6 +127,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/Bindings/Haskell/flake.nix b/Bindings/Haskell/flake.nix index cc71ac1..2f27a15 100644 --- a/Bindings/Haskell/flake.nix +++ b/Bindings/Haskell/flake.nix @@ -2,29 +2,27 @@ description = "Nix flake for P2PRC Haskell library"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - p2prc-main = "path:../../"; + p2prc-main.url = "path:../../"; }; - outputs = - { nixpkgs, flake-utils, p2prc-main-go, ... }: - flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - packages.default = pkgs.haskellPackages.callPackage ./project.nix {}; + outputs = { nixpkgs, flake-utils, p2prc-main, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + packages.default = pkgs.haskellPackages.callPackage ./project.nix {}; - devShell = pkgs.mkShell { - buildInputs = with pkgs; [ - cabal2nix - cabal-install - haskell.compiler.ghc98 - zlib.dev - p2prc-main-go.packages.${system}.default - ]; + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + cabal2nix + cabal-install + haskell.compiler.ghc98 + zlib.dev + p2prc-main.packages.${system}.default + ]; - }; - } + }; + } ); }