diff --git a/extras/build.nix b/extras/build.nix index 95f076dd..f120d8b4 100644 --- a/extras/build.nix +++ b/extras/build.nix @@ -23,7 +23,7 @@ # Makes a per system `lbf-nix` option. perSystem = flake-parts-lib.mkPerSystemOption - ({ pkgs, config, pkgsForCtl, pkgsForRust, ... }: { + ({ pkgs, config, pkgsForRust, ... }: { options.lbf-nix = lib.mkOption { type = lib.types.anything; @@ -40,9 +40,6 @@ lbf-nix = { # NOTE(bladyjoker): If you need to add a function the export externally and use internally via config.lbf-nix, add it here. - - purescriptFlake = import ./flake-purescript.nix pkgsForCtl; - rustFlake = import ./flake-rust.nix pkgsForRust; }; diff --git a/extras/flake-purescript.nix b/extras/flake-purescript.nix deleted file mode 100644 index 29a9a97a..00000000 --- a/extras/flake-purescript.nix +++ /dev/null @@ -1,42 +0,0 @@ -pkgs: pursProjOpts: -let - mkFlake = projectName: purs: - { - packages = { - "purescript:${projectName}:src" = pkgs.stdenv.mkDerivation { - name = projectName; - inherit (pursProjOpts) src; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - "purescript:${projectName}:lib" = purs.compiled; - "purescript:${projectName}:node-modules" = purs.nodeModules; - "purescript:${projectName}:webpack-web" = purs.bundlePursProjectWebpack { - main = "Test.Main"; - entrypoint = "app/index.js"; - bundledModuleName = "dist/output.js"; - }; - "purescript:${projectName}:esbuild-web" = purs.bundlePursProjectEsbuild { - main = "Test.Main"; - browserRuntime = true; - }; - "purescript:${projectName}:esbuild-nodejs" = purs.bundlePursProjectEsbuild { - main = "Test.Main"; - browserRuntime = false; - }; - # FIX(https://github.com/Plutonomicon/cardano-transaction-lib/issues/1578) - # "purescript:${projectName}:docs" = purs.buildPursDocs { }; - # "purescript:${projectName}:docs-search" = purs.buildSearchablePursDocs { }; - }; - - checks = { - "purescript:${projectName}:check-nodejs" = purs.runPursTest { - testMain = "Test.Main"; - buildInputs = if pursProjOpts ? "shell" then if pursProjOpts.shell ? "packages" then pursProjOpts.shell.packages else [ ] else [ ]; - }; - }; - - inherit (purs) devShell; - }; -in -mkFlake pursProjOpts.projectName (pkgs.purescriptProject pursProjOpts) diff --git a/flake.lock b/flake.lock index 5459b516..16b3db8f 100644 --- a/flake.lock +++ b/flake.lock @@ -13752,16 +13752,15 @@ "rust-overlay": "rust-overlay_11" }, "locked": { - "lastModified": 1706892391, - "narHash": "sha256-1Jamt1cCFcTXraFKl3nSLTO4x++nOw/J/0gDg0pZWJY=", + "lastModified": 1706927656, + "narHash": "sha256-WaPSrksAT5o1peV+UKJ23czBg2a7BBtINH89edsWQik=", "owner": "mlabs-haskell", "repo": "flake-lang.nix", - "rev": "c902020a4ff058e42f58e04373b5ac78cab2b801", + "rev": "116a01d925c9cf85f126b9ae4adf434f6010e473", "type": "github" }, "original": { "owner": "mlabs-haskell", - "ref": "bladyjoker/migrate-haskellFlake", "repo": "flake-lang.nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 8f0a1ce1..28903085 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ nixpkgs.url = "github:NixOS/nixpkgs"; # flake-lang.nix - flake-lang.url = "github:mlabs-haskell/flake-lang.nix?ref=bladyjoker/migrate-haskellFlake"; + flake-lang.url = "github:mlabs-haskell/flake-lang.nix"; # Nix diff --git a/runtimes/purescript/lbr-plutus/build.nix b/runtimes/purescript/lbr-plutus/build.nix index 7d8dd2cd..5f3f3821 100644 --- a/runtimes/purescript/lbr-plutus/build.nix +++ b/runtimes/purescript/lbr-plutus/build.nix @@ -1,9 +1,9 @@ -_: +{ inputs, ... }: { - perSystem = { pkgs, config, ... }: + perSystem = { pkgs, config, system, ... }: let - pursFlake = config.lbf-nix.purescriptFlake { + pursFlake = inputs.flake-lang.lib.${system}.purescriptFlake { inherit pkgs; src = ./.; projectName = "lbr-plutus"; diff --git a/runtimes/purescript/lbr-prelude/build.nix b/runtimes/purescript/lbr-prelude/build.nix index 4496011c..dff49cd5 100644 --- a/runtimes/purescript/lbr-prelude/build.nix +++ b/runtimes/purescript/lbr-prelude/build.nix @@ -1,9 +1,9 @@ -_: +{ inputs, ... }: { - perSystem = { pkgs, config, ... }: + perSystem = { pkgs, config, system, ... }: let - pursFlake = config.lbf-nix.purescriptFlake { + pursFlake = inputs.flake-lang.lib.${system}.purescriptFlake { inherit pkgs; src = ./.; projectName = "lbr-prelude"; diff --git a/testsuites/lbt-plutus/lbt-plutus-purescript/build.nix b/testsuites/lbt-plutus/lbt-plutus-purescript/build.nix index 2a60b83c..7b2c160e 100644 --- a/testsuites/lbt-plutus/lbt-plutus-purescript/build.nix +++ b/testsuites/lbt-plutus/lbt-plutus-purescript/build.nix @@ -1,9 +1,9 @@ -_: +{ inputs, ... }: { - perSystem = { pkgs, config, ... }: + perSystem = { pkgs, config, system, ... }: let - pursFlake = config.lbf-nix.purescriptFlake { + pursFlake = inputs.flake-lang.lib.${system}.purescriptFlake { src = ./.; projectName = "lbt-plutus"; strictComp = true; diff --git a/testsuites/lbt-prelude/lbt-prelude-purescript/build.nix b/testsuites/lbt-prelude/lbt-prelude-purescript/build.nix index a2011321..5a0388fa 100644 --- a/testsuites/lbt-prelude/lbt-prelude-purescript/build.nix +++ b/testsuites/lbt-prelude/lbt-prelude-purescript/build.nix @@ -1,9 +1,9 @@ -_: +{ inputs, ... }: { - perSystem = { pkgs, config, ... }: + perSystem = { pkgs, config, system, ... }: let - pursFlake = config.lbf-nix.purescriptFlake { + pursFlake = inputs.flake-lang.lib.${system}.purescriptFlake { src = ./.; projectName = "lbt-prelude"; strictComp = true;