diff --git a/pkgs/tools/package-management/lix/common.nix b/pkgs/tools/package-management/lix/common.nix index 19c7ddc58833..7fb40b11776c 100644 --- a/pkgs/tools/package-management/lix/common.nix +++ b/pkgs/tools/package-management/lix/common.nix @@ -1,21 +1,13 @@ { lib, fetchFromGitHub, - version, suffix ? "", - hash ? null, - src ? fetchFromGitHub { - owner = "lix-project"; - repo = "lix"; - rev = version; - inherit hash; - }, - docCargoHash ? null, - docCargoLock ? null, + version, + src, + docCargoDeps, patches ? [ ], maintainers ? lib.teams.lix.members, }@args: -assert (hash == null) -> (src != null); { stdenv, meson, @@ -60,8 +52,7 @@ assert (hash == null) -> (src != null); lix-doc ? callPackage ./doc { inherit src; version = "${version}${suffix}"; - cargoHash = docCargoHash; - cargoLock = docCargoLock; + cargoDeps = docCargoDeps; }, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, @@ -76,8 +67,6 @@ assert (hash == null) -> (src != null); stateDir, storeDir, }: -assert lib.assertMsg (docCargoHash != null || docCargoLock != null) - "Either `lix-doc`'s cargoHash using `docCargoHash` or `lix-doc`'s `cargoLock.lockFile` using `docCargoLock` must be set!"; let isLegacyParser = lib.versionOlder version "2.91"; in diff --git a/pkgs/tools/package-management/lix/default.nix b/pkgs/tools/package-management/lix/default.nix index 4a100c337ffb..1acc5e2efb48 100644 --- a/pkgs/tools/package-management/lix/default.nix +++ b/pkgs/tools/package-management/lix/default.nix @@ -5,6 +5,7 @@ callPackage, fetchFromGitHub, fetchpatch, + rustPlatform, Security, storeDir ? "/nix/store", @@ -54,18 +55,42 @@ lib.makeExtensible (self: { buildLix = common; lix_2_90 = ( - common { + common rec { version = "2.90.0"; - hash = "sha256-f8k+BezKdJfmE+k7zgBJiohtS3VkkriycdXYsKOm3sc="; - docCargoHash = "sha256-vSf9MyD2XzofZlbzsmh6NP69G+LiX72GX4Um9UJp3dc="; + + src = fetchFromGitHub { + owner = "lix-project"; + repo = "lix"; + rev = version; + hash = "sha256-f8k+BezKdJfmE+k7zgBJiohtS3VkkriycdXYsKOm3sc="; + }; + + docCargoDeps = rustPlatform.fetchCargoVendor { + name = "lix-doc-${version}"; + inherit src; + sourceRoot = "${src.name or src}/lix-doc"; + hash = "sha256-VPcrf78gfLlkTRrcbLkPgLOk0o6lsOJBm6HYLvavpNU="; + }; } ); lix_2_91 = ( - common { + common rec { version = "2.91.1"; - hash = "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U="; - docCargoHash = "sha256-F6Ld0HfRvW9r5zn8eMTP6djnV/jvwjYQet4Ghp2T90k="; + + src = fetchFromGitHub { + owner = "lix-project"; + repo = "lix"; + rev = version; + hash = "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U="; + }; + + docCargoDeps = rustPlatform.fetchCargoVendor { + name = "lix-doc-${version}"; + inherit src; + sourceRoot = "${src.name or src}/lix-doc"; + hash = "sha256-U820gvcbQIBaFr2OWPidfFIDXycDFGgXX1NpWDDqENs="; + }; } ); diff --git a/pkgs/tools/package-management/lix/doc/default.nix b/pkgs/tools/package-management/lix/doc/default.nix index 994310931e7d..3e61dc917579 100644 --- a/pkgs/tools/package-management/lix/doc/default.nix +++ b/pkgs/tools/package-management/lix/doc/default.nix @@ -2,8 +2,7 @@ src, rustPlatform, version, - cargoHash ? null, - cargoLock ? null, + cargoDeps, }: rustPlatform.buildRustPackage { @@ -12,7 +11,6 @@ rustPlatform.buildRustPackage { inherit version src - cargoHash - cargoLock + cargoDeps ; }