diff --git a/pkgs/by-name/ca/cadical/package.nix b/pkgs/by-name/ca/cadical/package.nix index 8cca4752544ce..141a161f379c9 100644 --- a/pkgs/by-name/ca/cadical/package.nix +++ b/pkgs/by-name/ca/cadical/package.nix @@ -7,21 +7,21 @@ version ? "2.2.0", }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "cadical"; inherit version; src = fetchFromGitHub { owner = "arminbiere"; repo = "cadical"; - rev = "rel-${version}"; + rev = "rel-${finalAttrs.version}"; hash = { "2.2.0" = "sha256-6O0lz0YJzk1eJblQ0/f9PnSYqD8WoendIZioQiGUpCg="; "2.1.3" = "sha256-W3kO+6nVzkmJXyHJU+NZWP0oatK3gon4EWF1/03rgL4="; "2.0.0" = "sha256-qoeEM9SdpuFuBPeQlCzuhPLcJ+bMQkTUTGiT8QdU8rc="; } - .${version}; + .${finalAttrs.version}; }; outputs = [ @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { pkgconfigItems = [ (makePkgconfigItem { name = "cadical"; - inherit version; + inherit (finalAttrs) version; cflags = [ "-I\${includedir}" ]; libs = [ "-L\${libdir}" @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { includedir = "@includedir@"; libdir = "@libdir@"; }; - inherit (meta) description; + inherit (finalAttrs.meta) description; }) ]; @@ -63,10 +63,12 @@ stdenv.mkDerivation rec { substituteInPlace makefile.in --replace-fail "ar rc" '$(AR) rc' '' # Racy/flaky tests that sometimes spontaneously combust on darwin. - + lib.optionalString (stdenv.hostPlatform.isDarwin && (lib.versionAtLeast version "2.1.1")) '' - substituteInPlace test/api/run.sh --replace-fail 'run parcompwrite' "" - substituteInPlace test/api/run.sh --replace-fail 'run example_tracer' "" - ''; + + + lib.optionalString (stdenv.hostPlatform.isDarwin && (lib.versionAtLeast finalAttrs.version "2.1.1")) + '' + substituteInPlace test/api/run.sh --replace-fail 'run parcompwrite' "" + substituteInPlace test/api/run.sh --replace-fail 'run example_tracer' "" + ''; # the configure script is not generated by autotools and does not accept the # arguments that the default configurePhase passes like --prefix and --libdir @@ -88,8 +90,8 @@ stdenv.mkDerivation rec { install -Dm0644 src/cadical.hpp "$dev/include/cadical/cadical.hpp" install -Dm0644 src/tracer.hpp "$dev/include/cadical/tracer.hpp" install -Dm0644 build/libcadical.a "$lib/lib/libcadical.a" - mkdir -p "$out/share/doc/${pname}/" - install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${pname}/" + mkdir -p "$out/share/doc/${finalAttrs.pname}/" + install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${finalAttrs.pname}/" runHook postInstall ''; @@ -101,4 +103,4 @@ stdenv.mkDerivation rec { license = lib.licenses.mit; homepage = "https://fmv.jku.at/cadical/"; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-machete/package.nix b/pkgs/by-name/ca/cargo-machete/package.nix index 28fb82e53a4b8..eda82f4dd922f 100644 --- a/pkgs/by-name/ca/cargo-machete/package.nix +++ b/pkgs/by-name/ca/cargo-machete/package.nix @@ -4,14 +4,14 @@ fetchFromGitHub, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-machete"; version = "0.9.1"; src = fetchFromGitHub { owner = "bnjbvr"; repo = "cargo-machete"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-4tzffZeHdhAq6/K1BGkThqT+CBa3rUw+kR7aLwnqZjc="; }; @@ -24,10 +24,10 @@ rustPlatform.buildRustPackage rec { description = "Cargo tool that detects unused dependencies in Rust projects"; mainProgram = "cargo-machete"; homepage = "https://github.com/bnjbvr/cargo-machete"; - changelog = "https://github.com/bnjbvr/cargo-machete/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/bnjbvr/cargo-machete/blob/v${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ matthiasbeyer ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-nextest/package.nix b/pkgs/by-name/ca/cargo-nextest/package.nix index 5319d368fa7df..5cb0ced4ebf03 100644 --- a/pkgs/by-name/ca/cargo-nextest/package.nix +++ b/pkgs/by-name/ca/cargo-nextest/package.nix @@ -6,14 +6,14 @@ nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-nextest"; version = "0.9.114"; src = fetchFromGitHub { owner = "nextest-rs"; repo = "nextest"; - rev = "cargo-nextest-${version}"; + tag = "cargo-nextest-${finalAttrs.version}"; hash = "sha256-0l8+YKIdKhvwdEbvSgYcX1deq+aRZkxXUCw2zMSO4cU="; }; @@ -49,4 +49,4 @@ rustPlatform.buildRustPackage rec { matthiasbeyer ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-rdme/package.nix b/pkgs/by-name/ca/cargo-rdme/package.nix index e823b3455f981..0fe5c7bae1083 100644 --- a/pkgs/by-name/ca/cargo-rdme/package.nix +++ b/pkgs/by-name/ca/cargo-rdme/package.nix @@ -4,12 +4,12 @@ fetchCrate, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-rdme"; version = "1.5.0"; src = fetchCrate { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-TmV6Fc5vlc4fm9w4+iuxmnonwsEbqoJ3jvpIyQOuxjg="; }; @@ -19,8 +19,8 @@ rustPlatform.buildRustPackage rec { description = "Cargo command to create the README.md from your crate's documentation"; mainProgram = "cargo-rdme"; homepage = "https://github.com/orium/cargo-rdme"; - changelog = "https://github.com/orium/cargo-rdme/blob/v${version}/release-notes.md"; + changelog = "https://github.com/orium/cargo-rdme/blob/v${finalAttrs.version}/release-notes.md"; license = with lib.licenses; [ mpl20 ]; maintainers = with lib.maintainers; [ GoldsteinE ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-semver-checks/package.nix b/pkgs/by-name/ca/cargo-semver-checks/package.nix index 005ba3e2a6f26..e79c983475be0 100644 --- a/pkgs/by-name/ca/cargo-semver-checks/package.nix +++ b/pkgs/by-name/ca/cargo-semver-checks/package.nix @@ -9,14 +9,14 @@ nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-semver-checks"; version = "0.45.0"; src = fetchFromGitHub { owner = "obi1kenobi"; repo = "cargo-semver-checks"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-sDx449IXsFUeNL7rXbGC+HUshwqcbpjvGwl0WIJZmwo="; }; @@ -48,7 +48,7 @@ rustPlatform.buildRustPackage rec { substituteInPlace test_outputs/integration_snapshots__bugreport.snap \ --replace-fail \ 'cargo-semver-checks [VERSION] ([HASH])' \ - 'cargo-semver-checks ${version}' + 'cargo-semver-checks ${finalAttrs.version}' ''; passthru = { @@ -60,7 +60,7 @@ rustPlatform.buildRustPackage rec { description = "Tool to scan your Rust crate for semver violations"; mainProgram = "cargo-semver-checks"; homepage = "https://github.com/obi1kenobi/cargo-semver-checks"; - changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${version}"; + changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${finalAttrs.version}"; license = with lib.licenses; [ mit # or asl20 @@ -69,4 +69,4 @@ rustPlatform.buildRustPackage rec { matthiasbeyer ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-show-asm/package.nix b/pkgs/by-name/ca/cargo-show-asm/package.nix index 9e6f15f78155a..ab9f40a62cd36 100644 --- a/pkgs/by-name/ca/cargo-show-asm/package.nix +++ b/pkgs/by-name/ca/cargo-show-asm/package.nix @@ -8,12 +8,12 @@ callPackage, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-show-asm"; version = "0.2.54"; src = fetchCrate { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-AF8fFPdiSZ/odPg3Kp72+LlJ+ox0PU+dH1fhPSt61n8="; }; @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { meta = { description = "Cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code"; homepage = "https://github.com/pacak/cargo-show-asm"; - changelog = "https://github.com/pacak/cargo-show-asm/blob/${version}/Changelog.md"; + changelog = "https://github.com/pacak/cargo-show-asm/blob/${finalAttrs.version}/Changelog.md"; license = with lib.licenses; [ asl20 mit @@ -51,4 +51,4 @@ rustPlatform.buildRustPackage rec { ]; mainProgram = "cargo-asm"; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-spellcheck/package.nix b/pkgs/by-name/ca/cargo-spellcheck/package.nix index 794b2f2531a85..78faedf683185 100644 --- a/pkgs/by-name/ca/cargo-spellcheck/package.nix +++ b/pkgs/by-name/ca/cargo-spellcheck/package.nix @@ -4,14 +4,14 @@ fetchFromGitHub, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-spellcheck"; version = "0.15.5"; src = fetchFromGitHub { owner = "drahnr"; repo = "cargo-spellcheck"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-saRr1xEBefLoCgCxU/pyQOmmt/di+DOQHMoVc4LgRm0="; }; @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { description = "Checks rust documentation for spelling and grammar mistakes"; mainProgram = "cargo-spellcheck"; homepage = "https://github.com/drahnr/cargo-spellcheck"; - changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 # or mit @@ -41,4 +41,4 @@ rustPlatform.buildRustPackage rec { matthiasbeyer ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-udeps/package.nix b/pkgs/by-name/ca/cargo-udeps/package.nix index bcfb58c99d53b..8b7720cea360e 100644 --- a/pkgs/by-name/ca/cargo-udeps/package.nix +++ b/pkgs/by-name/ca/cargo-udeps/package.nix @@ -8,14 +8,14 @@ libiconv, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-udeps"; version = "0.1.60"; src = fetchFromGitHub { owner = "est31"; repo = "cargo-udeps"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-NW9yjFUV+o7vv5bYD8nxSWHOXOBnDEk36xze90wYuNg="; }; @@ -44,4 +44,4 @@ rustPlatform.buildRustPackage rec { ]; mainProgram = "cargo-udeps"; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-valgrind/package.nix b/pkgs/by-name/ca/cargo-valgrind/package.nix index 995bbe5fcffac..27632daa64b7b 100644 --- a/pkgs/by-name/ca/cargo-valgrind/package.nix +++ b/pkgs/by-name/ca/cargo-valgrind/package.nix @@ -6,14 +6,14 @@ makeWrapper, valgrind, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-valgrind"; version = "2.4.0"; src = fetchFromGitHub { owner = "jfrimmel"; repo = "cargo-valgrind"; - tag = version; + tag = finalAttrs.version; sha256 = "sha256-sVW3zNe0a9iQQ0vRWJofqG4gwUJ/w0U4ugVyMNtWX98="; }; @@ -51,4 +51,4 @@ rustPlatform.buildRustPackage rec { matthiasbeyer ]; }; -} +}) diff --git a/pkgs/by-name/ki/kissat/package.nix b/pkgs/by-name/ki/kissat/package.nix index 136b6e1d6bc39..3535c5970ff8d 100644 --- a/pkgs/by-name/ki/kissat/package.nix +++ b/pkgs/by-name/ki/kissat/package.nix @@ -23,14 +23,14 @@ let homepage = "https://fmv.jku.at/kissat"; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "kissat"; version = "4.0.4"; src = fetchFromGitHub { owner = "arminbiere"; repo = "kissat"; - rev = "rel-${version}"; + rev = "rel-${finalAttrs.version}"; sha256 = "sha256-hgB1U2Pmh1hEyNA3ej3fXxxf0YjCRgtOuSddRl6s0eo="; }; @@ -87,9 +87,9 @@ stdenv.mkDerivation rec { libdir=${placeholder "lib"}/lib includedir=\''${prefix}/include - Name: ${pname} + Name: ${finalAttrs.pname} Description: ${meta.description} - Version: ${version} + Version: ${finalAttrs.version} Libs: -L\''${libdir} -lkissat Cflags: -I\''${includedir} EOF @@ -98,4 +98,4 @@ stdenv.mkDerivation rec { ''; inherit meta; -} +}) diff --git a/pkgs/by-name/re/release-plz/package.nix b/pkgs/by-name/re/release-plz/package.nix index c34b2ab2472d5..614ecd244986d 100644 --- a/pkgs/by-name/re/release-plz/package.nix +++ b/pkgs/by-name/re/release-plz/package.nix @@ -9,14 +9,14 @@ openssl, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "release-plz"; version = "0.3.148"; src = fetchFromGitHub { owner = "MarcoIeni"; repo = "release-plz"; - rev = "release-plz-v${version}"; + rev = "release-plz-v${finalAttrs.version}"; hash = "sha256-XvmgpsCxbXc+NvzKZBXmhcIM+SKCTPkQldObUuXHVus="; }; @@ -36,16 +36,16 @@ rustPlatform.buildRustPackage rec { doCheck = false; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - installShellCompletion --cmd ${meta.mainProgram} \ - --bash <($out/bin/${meta.mainProgram} generate-completions bash) \ - --fish <($out/bin/${meta.mainProgram} generate-completions fish) \ - --zsh <($out/bin/${meta.mainProgram} generate-completions zsh) + installShellCompletion --cmd ${finalAttrs.meta.mainProgram} \ + --bash <($out/bin/${finalAttrs.meta.mainProgram} generate-completions bash) \ + --fish <($out/bin/${finalAttrs.meta.mainProgram} generate-completions fish) \ + --zsh <($out/bin/${finalAttrs.meta.mainProgram} generate-completions zsh) ''; meta = { description = "Publish Rust crates from CI with a Release PR"; homepage = "https://release-plz.ieni.dev"; - changelog = "https://github.com/MarcoIeni/release-plz/blob/release-plz-v${version}/CHANGELOG.md"; + changelog = "https://github.com/MarcoIeni/release-plz/blob/release-plz-v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 mit @@ -54,4 +54,4 @@ rustPlatform.buildRustPackage rec { mainProgram = "release-plz"; broken = stdenv.hostPlatform.isDarwin; }; -} +}) diff --git a/pkgs/by-name/ty/typos/package.nix b/pkgs/by-name/ty/typos/package.nix index ac726251b6615..41fdf16a30eb8 100644 --- a/pkgs/by-name/ty/typos/package.nix +++ b/pkgs/by-name/ty/typos/package.nix @@ -6,14 +6,14 @@ nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "typos"; version = "1.39.2"; src = fetchFromGitHub { owner = "crate-ci"; repo = "typos"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-N8lz/PEGtqBHH9smUGoPghGEIGukrS/9POv+FAb8L/M="; }; @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { description = "Source code spell checker"; mainProgram = "typos"; homepage = "https://github.com/crate-ci/typos"; - changelog = "https://github.com/crate-ci/typos/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/crate-ci/typos/blob/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 # or mit @@ -46,4 +46,4 @@ rustPlatform.buildRustPackage rec { mgttlinger ]; }; -} +})