Closed deemp closed 1 year ago
The issue is that both packages have a package.json
in their output, and so the merging doesn't like it.
The proper fix would be to not put the package.json in the top of the $out of the package. In general, $out should only contain folders like ./bin ./lib ... so that there are no clashes like that.
The quick fix is to wrap one of the packages with pkgs.lib.lowPrio
to instruct buildEnv on which one's package.json should be linked to. Eg:
diff --git a/purifixProject/flake.nix b/purifixProject/flake.nix
index 868298a..f2677fc 100644
--- a/purifixProject/flake.nix
+++ b/purifixProject/flake.nix
@@ -38,7 +38,7 @@
devShells.devshell = pkgs.devshell.mkShell {
packages = [
pkgs.purs-unstable
- pkgs.spago-unstable
+ (pkgs.lib.lowPrio pkgs.spago-unstable)
pkgs.purs-tidy-unstable
];
};
Here's where package.json
is moved to $out
:
If not move it there, there'll be NodeJS errors when trying to execute $out/bin/spago
.
UPD: NodeJS package files can be moved to $out/node_modules/package_name
like here https://github.com/thomashoneyman/purescript-overlay/pull/40
Describe the bug
There happen collisions between outputs of derivations.
To Reproduce
nix develop github:deemp/gists/ffd2e94d21f1939a4c55d7fa3459bc2c910f4f50?dir=purifixProject#devshell
Expected behavior
purs
,spago
,purs-tidy
binaries are on PATH.System information
x86_64-linux
Additional context
There are other issues mentioning the problem.
Possible solution