nix: remove version from package names

This commit is contained in:
Yusuf Bera Ertan 2020-12-11 17:50:06 +03:00
parent dd68285d79
commit 4c61914b91
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -52,9 +52,6 @@ let
if tag != "" then tag if tag != "" then tag
else if prettyRev != "" then prettyRev else if prettyRev != "" then prettyRev
else throw "Need a tag or at least revision + lastModified in order to determine version"; else throw "Need a tag or at least revision + lastModified in order to determine version";
# Sanitize version string since it might contain illegal characters for a Nix store path
# Used in the derivation(s) name
sanitizedVersion = pkgs.stdenv.lib.strings.sanitizeDerivationName version;
veloren-assets = pkgs.runCommand "makeAssetsDir" { } '' veloren-assets = pkgs.runCommand "makeAssetsDir" { } ''
mkdir $out mkdir $out
@ -88,7 +85,7 @@ let
NIX_GIT_TAG = tag; NIX_GIT_TAG = tag;
}; };
veloren-server-cli = _: { veloren-server-cli = _: {
name = "veloren-server-cli_${sanitizedVersion}"; name = "veloren-server-cli";
inherit version; inherit version;
VELOREN_USERDATA_STRATEGY = "system"; VELOREN_USERDATA_STRATEGY = "system";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -103,7 +100,7 @@ let
}; };
}; };
veloren-voxygen = _: { veloren-voxygen = _: {
name = "veloren-voxygen_${sanitizedVersion}"; name = "veloren-voxygen";
inherit version; inherit version;
VELOREN_USERDATA_STRATEGY = "system"; VELOREN_USERDATA_STRATEGY = "system";
inherit (crateDeps.veloren-voxygen) buildInputs; inherit (crateDeps.veloren-voxygen) buildInputs;