Skip to content

Commit

Permalink
feat: read package version
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jan 28, 2024
1 parent 43bee3c commit e6de7e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nix/build-spago-lock.nix
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@

src = drv.out;

version = drv.version or defaultVersion;
version = drv.version or (
if builtins.pathExists "${src}/spago.yaml"
then lib.attrByPath [ "package" "publish" "version" ] defaultVersion (fromYAML (builtins.readFile "${src}/spago.yaml"))
else defaultVersion
);

nativeBuildInputs = [purs jq];

Expand Down

0 comments on commit e6de7e3

Please sign in to comment.