kicad: use hash rather than date for package names

to prevent duplication when just the date changes

kicad.libraries should be fixed output derivations?
This commit is contained in:
Evils 2020-08-07 08:46:49 +02:00
parent f84aae6f67
commit 43a6b7b886
2 changed files with 5 additions and 3 deletions

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
i18n = libraries.i18n;
pname = "kicad-base";
version = "${versions.${baseName}.kicadVersion.version}";
version = "${builtins.substring 0 10 versions.${baseName}.kicadVersion.src.rev}";
src = fetchFromGitLab (
{

View file

@ -15,7 +15,9 @@ let
mkLib = name:
stdenv.mkDerivation {
pname = "kicad-${name}";
version = "${version}";
# Use the revision instead of `version` (which is an ISO 8601 date)
# to prevent duplicating the library when just the date changed
version = "${builtins.substring 0 10 libSources.${name}.rev}";
src = fetchFromGitHub (
{
owner = "KiCad";
@ -50,7 +52,7 @@ in
i18n = let name = "i18n"; in
stdenv.mkDerivation {
pname = "kicad-${name}";
version = "${version}";
version = "${builtins.substring 0 10 libSources.${name}.rev}";
src = fetchFromGitLab (
{
group = "kicad";