From 956c6de476a039268c8f4477109d0336c8a35684 Mon Sep 17 00:00:00 2001 From: Daniel Beckwith Date: Sun, 5 Mar 2023 10:10:31 -0500 Subject: [PATCH] handle semver-only package version in fromManifestFile --- rust-overlay.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust-overlay.nix b/rust-overlay.nix index fb862ec..46543b7 100644 --- a/rust-overlay.nix +++ b/rust-overlay.nix @@ -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;