Skip to content

Commit

Permalink
handle semver-only package version in fromManifestFile
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeckwith committed Mar 5, 2023
1 parent 78e7239 commit 956c6de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rust-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ let
makeOverridable ({extensions, targets, targetExtensions}:
let
version' = builtins.match "([^ ]*) [(]([^ ]*) ([^ ]*)[)]" pkg.version;
version = "${elemAt version' 0}-${elemAt version' 2}-${elemAt version' 1}";
version =
if version' == null
then pkg.version
else "${elemAt version' 0}-${elemAt version' 2}-${elemAt version' 1}";
namesAndSrcs = getComponents pkgs.pkg name targets extensions targetExtensions stdenv fetchurl;
components = installComponents stdenv namesAndSrcs;
componentsOuts = builtins.map (comp: (super.lib.strings.escapeNixString (super.lib.getOutput "out" comp))) components;
Expand Down

0 comments on commit 956c6de

Please sign in to comment.