From ab81a6cb45e2995ed47e4b6656358a423d7ab792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 11 Feb 2021 15:04:30 +0100 Subject: [PATCH 1/4] maturin: replace name by pname --- pkgs/development/tools/rust/maturin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix index d40145f163b2..fec5ead5d42b 100644 --- a/pkgs/development/tools/rust/maturin/default.nix +++ b/pkgs/development/tools/rust/maturin/default.nix @@ -4,7 +4,7 @@ let inherit (darwin.apple_sdk.frameworks) Security; in rustPlatform.buildRustPackage rec { - name = "maturin-${version}"; + pname = "maturin"; version = "0.9.0"; src = fetchFromGitHub { From 2596df2322da9b1c7998a5aa6fe9019fb7299d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 12 Feb 2021 10:45:00 +0100 Subject: [PATCH 2/4] maturin: take Security as an argument, rather than darwin --- pkgs/development/tools/rust/maturin/default.nix | 6 ++---- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix index fec5ead5d42b..c9513864086b 100644 --- a/pkgs/development/tools/rust/maturin/default.nix +++ b/pkgs/development/tools/rust/maturin/default.nix @@ -1,9 +1,7 @@ { lib, stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkg-config -, darwin }: +, Security }: -let - inherit (darwin.apple_sdk.frameworks) Security; -in rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage rec { pname = "maturin"; version = "0.9.0"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bef22c21e98c..35ccb876badd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10833,7 +10833,10 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; - maturin = callPackage ../development/tools/rust/maturin { }; + maturin = callPackage ../development/tools/rust/maturin { + inherit (darwin.apple_sdk.frameworks) Security; + }; + inherit (rustPackages) rls; rustfmt = rustPackages.rustfmt; rustracer = callPackage ../development/tools/rust/racer { From 825ce379a86a2501692fbd1b4535cca979831277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 12 Feb 2021 10:47:30 +0100 Subject: [PATCH 3/4] maturin: reformat, use hash/cargoHash --- pkgs/development/tools/rust/maturin/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix index c9513864086b..38217e4b4e15 100644 --- a/pkgs/development/tools/rust/maturin/default.nix +++ b/pkgs/development/tools/rust/maturin/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkg-config -, Security }: +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, pkg-config +, dbus +, gmp +, openssl +, Security +}: rustPlatform.buildRustPackage rec { pname = "maturin"; @@ -9,10 +17,10 @@ rustPlatform.buildRustPackage rec { owner = "PyO3"; repo = "maturin"; rev = "v${version}"; - sha256 = "sha256-X5/1zEVhhdTuyXcUwC3jVv9Gblmv8LT+ftsVo8BnnZs="; + hash = "sha256-X5/1zEVhhdTuyXcUwC3jVv9Gblmv8LT+ftsVo8BnnZs="; }; - cargoSha256 = "sha256-PBmuPIpCwC7fr/MKFaeSd/0avoEATlxoeMHisjouAeI="; + cargoHash = "sha256-PBmuPIpCwC7fr/MKFaeSd/0avoEATlxoeMHisjouAeI="; nativeBuildInputs = [ pkg-config ]; From bbb28ccf1a253da153950c102940f614d4e7b578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 12 Feb 2021 10:54:10 +0100 Subject: [PATCH 4/4] maturin: remove (now) unused gmp and openssl buildInputs --- pkgs/development/tools/rust/maturin/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix index 38217e4b4e15..b9c2e08ba142 100644 --- a/pkgs/development/tools/rust/maturin/default.nix +++ b/pkgs/development/tools/rust/maturin/default.nix @@ -4,8 +4,6 @@ , rustPlatform , pkg-config , dbus -, gmp -, openssl , Security }: @@ -24,9 +22,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gmp openssl ] - ++ lib.optional stdenv.isDarwin Security - ++ lib.optional stdenv.isLinux dbus; + buildInputs = lib.optional stdenv.isLinux dbus + ++ lib.optional stdenv.isDarwin Security; # Requires network access, fails in sandbox. doCheck = false;