gnuradio: help nix-update find version string
This commit is contained in:
parent
c6e3bbc550
commit
441f8ee17f
@ -40,11 +40,7 @@
|
||||
# If one wishes to use a different src or name for a very custom build
|
||||
, overrideSrc ? {}
|
||||
, pname ? "gnuradio"
|
||||
, versionAttr ? {
|
||||
major = "3.8";
|
||||
minor = "5";
|
||||
patch = "0";
|
||||
}
|
||||
, version ? "3.8.5.0"
|
||||
}:
|
||||
|
||||
let
|
||||
@ -214,7 +210,7 @@ let
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
version
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
@ -222,13 +218,12 @@ let
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
inherit (shared.passthru) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
inherit pname version;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
|
@ -42,11 +42,7 @@
|
||||
# If one wishes to use a different src or name for a very custom build
|
||||
, overrideSrc ? {}
|
||||
, pname ? "gnuradio"
|
||||
, versionAttr ? {
|
||||
major = "3.9";
|
||||
minor = "8";
|
||||
patch = "0";
|
||||
}
|
||||
, version ? "3.9.8.0"
|
||||
}:
|
||||
|
||||
let
|
||||
@ -250,7 +246,7 @@ let
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
version
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
@ -258,13 +254,12 @@ let
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
inherit (shared.passthru) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
inherit pname version;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
|
@ -45,11 +45,7 @@
|
||||
# If one wishes to use a different src or name for a very custom build
|
||||
, overrideSrc ? {}
|
||||
, pname ? "gnuradio"
|
||||
, versionAttr ? {
|
||||
major = "3.10";
|
||||
minor = "7";
|
||||
patch = "0";
|
||||
}
|
||||
, version ? "3.10.7.0"
|
||||
}:
|
||||
|
||||
let
|
||||
@ -271,7 +267,7 @@ let
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
version
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
@ -279,13 +275,12 @@ let
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
inherit (shared.passthru) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
inherit pname version;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
|
@ -5,7 +5,7 @@
|
||||
, removeReferencesTo
|
||||
, featuresInfo
|
||||
, features
|
||||
, versionAttr
|
||||
, version
|
||||
, sourceSha256
|
||||
# If overridden. No need to set default values, as they are given defaults in
|
||||
# the main expressions
|
||||
@ -13,10 +13,21 @@
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rec {
|
||||
version = builtins.concatStringsSep "." (
|
||||
lib.attrVals [ "major" "minor" "patch" ] versionAttr
|
||||
let
|
||||
# Check if a feature is enabled, while defaulting to true if feat is not
|
||||
# specified.
|
||||
hasFeature = feat: (
|
||||
if builtins.hasAttr feat features then
|
||||
features.${feat}
|
||||
else
|
||||
true
|
||||
);
|
||||
versionAttr = {
|
||||
major = builtins.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
|
||||
minor = builtins.elemAt (lib.splitVersion version) 2;
|
||||
patch = builtins.elemAt (lib.splitVersion version) 3;
|
||||
};
|
||||
in {
|
||||
src = if overrideSrc != {} then
|
||||
overrideSrc
|
||||
else
|
||||
@ -27,14 +38,6 @@ rec {
|
||||
sha256 = sourceSha256;
|
||||
}
|
||||
;
|
||||
# Check if a feature is enabled, while defaulting to true if feat is not
|
||||
# specified.
|
||||
hasFeature = feat: (
|
||||
if builtins.hasAttr feat features then
|
||||
features.${feat}
|
||||
else
|
||||
true
|
||||
);
|
||||
nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
|
||||
feat: info: (
|
||||
lib.optionals (hasFeature feat) (
|
||||
|
Loading…
Reference in New Issue
Block a user