diff --git a/pkgs/by-name/ca/cadical/package.nix b/pkgs/by-name/ca/cadical/package.nix index 7cc3cdf1e68e1..79ae0a37fc201 100644 --- a/pkgs/by-name/ca/cadical/package.nix +++ b/pkgs/by-name/ca/cadical/package.nix @@ -7,14 +7,14 @@ version ? "3.0.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 = { "3.0.0" = "sha256-pymbSC6bwQQ0YCtJd3xWZiC22UEkFiKSLObSOnoQj9I="; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { "2.1.3" = "sha256-W3kO+6nVzkmJXyHJU+NZWP0oatK3gon4EWF1/03rgL4="; "2.0.0" = "sha256-qoeEM9SdpuFuBPeQlCzuhPLcJ+bMQkTUTGiT8QdU8rc="; } - .${version}; + .${finalAttrs.version}; }; outputs = [ @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { pkgconfigItems = [ (makePkgconfigItem { name = "cadical"; - inherit version; + inherit (finalAttrs) version; cflags = [ "-I\${includedir}" ]; libs = [ "-L\${libdir}" @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { includedir = "@includedir@"; libdir = "@libdir@"; }; - inherit (meta) description; + inherit (finalAttrs.meta) description; }) ]; @@ -64,10 +64,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 @@ -89,8 +91,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 ''; @@ -105,4 +107,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 988c6847c4c0c..54119634c2ae8 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,11 +24,11 @@ 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 chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-nextest/package.nix b/pkgs/by-name/ca/cargo-nextest/package.nix index a2f0476fbf226..a3201f766a3c6 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.124"; src = fetchFromGitHub { owner = "nextest-rs"; repo = "nextest"; - tag = "cargo-nextest-${version}"; + tag = "cargo-nextest-${finalAttrs.version}"; hash = "sha256-qvJ/dqbls2fVSPY++kYBIeiu14eDD8ORuvcD8dEtMZ8="; }; @@ -51,4 +51,4 @@ rustPlatform.buildRustPackage rec { chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-rdme/package.nix b/pkgs/by-name/ca/cargo-rdme/package.nix index 56bd4a7815525..2931e682c3cc4 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,11 +19,11 @@ 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 chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-semver-checks/package.nix b/pkgs/by-name/ca/cargo-semver-checks/package.nix index 945ba91c9cdf5..de3da1920ac83 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.46.0"; src = fetchFromGitHub { owner = "obi1kenobi"; repo = "cargo-semver-checks"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-y2tkTPctit5rx6OyohPPVo117sGICg6UEDg7RWFmtMA="; }; @@ -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 @@ -70,4 +70,4 @@ rustPlatform.buildRustPackage rec { chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-show-asm/package.nix b/pkgs/by-name/ca/cargo-show-asm/package.nix index 28d29bffcba27..02f170bb678ed 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.55"; src = fetchCrate { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-ZSPlFDnLVQp1uz1VrbXmw8bAM1/ZWojAv7PSFG+k2Pw="; }; @@ -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 @@ -52,4 +52,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 cf879d345e88e..ac8a29bf56fdf 100644 --- a/pkgs/by-name/ca/cargo-spellcheck/package.nix +++ b/pkgs/by-name/ca/cargo-spellcheck/package.nix @@ -5,14 +5,14 @@ stdenv, }: -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="; }; @@ -34,7 +34,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 @@ -45,4 +45,4 @@ rustPlatform.buildRustPackage rec { chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ca/cargo-udeps/package.nix b/pkgs/by-name/ca/cargo-udeps/package.nix index 0dbf4665f667b..13d6617b1e16a 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="; }; @@ -45,4 +45,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 a9d021379ac83..edbdf5cef3d22 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="; }; @@ -52,4 +52,4 @@ rustPlatform.buildRustPackage rec { chrjabs ]; }; -} +}) diff --git a/pkgs/by-name/ki/kissat/package.nix b/pkgs/by-name/ki/kissat/package.nix index d4f113a724dd3..1983bc6b312e7 100644 --- a/pkgs/by-name/ki/kissat/package.nix +++ b/pkgs/by-name/ki/kissat/package.nix @@ -26,14 +26,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="; }; @@ -90,9 +90,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 @@ -101,4 +101,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 32f66c72dcf88..7d4798a8e026e 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.154"; src = fetchFromGitHub { owner = "MarcoIeni"; repo = "release-plz"; - rev = "release-plz-v${version}"; + rev = "release-plz-v${finalAttrs.version}"; hash = "sha256-sg5i7JwDkhvEBYZtm6USCDDWWnI97IIKeXHhpDP3V/o="; }; @@ -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 @@ -57,4 +57,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 565f9eda4fa0e..c36b2a3727112 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.42.3"; src = fetchFromGitHub { owner = "crate-ci"; repo = "typos"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-u9hjY/d4Ul+EvZIoTJzWkUl4j+Vzcvu61x2USP0hGiw="; }; @@ -36,7 +36,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 { chrjabs ]; }; -} +}) diff --git a/pkgs/development/python-modules/python-sat/default.nix b/pkgs/development/python-modules/python-sat/default.nix index 2ff96012e945b..8f7b2f14618d7 100644 --- a/pkgs/development/python-modules/python-sat/default.nix +++ b/pkgs/development/python-modules/python-sat/default.nix @@ -7,7 +7,7 @@ pypblib, pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "python-sat"; version = "1.8.dev28"; pyproject = true; @@ -15,7 +15,7 @@ buildPythonPackage rec { build-system = [ setuptools ]; src = fetchPypi { - inherit version; + inherit (finalAttrs) version; pname = "python_sat"; hash = "sha256-eFBUismC7x2+ng+8rbXxZTis/xNKSx2I/lVkCbx4dgo="; }; @@ -57,4 +57,4 @@ buildPythonPackage rec { ]; platforms = lib.platforms.all; }; -} +})