Skip to content

Commit 09accb1

Browse files
committed
pin-depends: support proper version constraints
Fixes #13
1 parent d8d6d90 commit 09accb1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/opam.nix

+6-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,12 @@ in rec {
404404
// {
405405
inherit url;
406406
};
407-
repo = filterOpamRepo { ${name} = null; } (makeOpamRepo path);
407+
repo = (filterOpamRepo { ${name} = null; } (makeOpamRepo path)).overrideAttrs (oa: {
408+
# Move the package to the proper version
409+
buildCommand = oa.buildCommand + ''
410+
mv "packages/${name}/$(ls "packages/${name}" | head -1)" "packages/${name}/${name}.${version}"
411+
'';
412+
});
408413
in if !hasRev && !isImpure then
409414
lib.warn
410415
"pin-depends without an explicit sha1 is not supported in pure evaluation mode; try with --impure"

0 commit comments

Comments
 (0)