about summary refs log tree commit diff
path: root/pkgs/development/tools/systemfd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/systemfd/default.nix')
-rw-r--r--pkgs/development/tools/systemfd/default.nix44
1 files changed, 29 insertions, 15 deletions
diff --git a/pkgs/development/tools/systemfd/default.nix b/pkgs/development/tools/systemfd/default.nix
index a1c93f46dcb70..a695cf83a2954 100644
--- a/pkgs/development/tools/systemfd/default.nix
+++ b/pkgs/development/tools/systemfd/default.nix
@@ -1,18 +1,32 @@
-{ lib, fetchgit, darwin, buildPlatform
-, buildRustCrate, buildRustCrateHelpers, defaultCrateOverrides }:
+{ lib
+, fetchFromGitHub
+, rustPlatform
+}:
 
-((import ./Cargo.nix {
-  inherit lib buildPlatform buildRustCrate buildRustCrateHelpers fetchgit;
-  cratesIO = import ./crates-io.nix { inherit lib buildRustCrate buildRustCrateHelpers; };
-}).systemfd {}).override {
-  crateOverrides = defaultCrateOverrides // {
-    systemfd = attrs: {
-        meta = {
-          description = "A convenient helper for passing sockets into another process";
-          homepage = "https://github.com/mitsuhiko/systemfd";
-          license = lib.licenses.asl20;
-          maintainers = [ lib.maintainers.adisbladis ];
-        };
-    };
+let
+  version = "0.4.0";
+
+in
+rustPlatform.buildRustPackage {
+
+  pname = "systemfd";
+  inherit version;
+
+  src = fetchFromGitHub {
+    repo = "systemfd";
+    owner = "mitsuhiko";
+    rev = version;
+    sha256 = "sha256-HUJgYPD4C9fMUYKpzmIy9gDT6HAZDWw1JLMKLgzRQTY=";
   };
+
+  cargoSha256 = "sha256-UhfE9Q5E79rN2mjkNB5IAN/J0fbpoy9CmM6ojHQcFP0=";
+
+  meta = {
+    description = "A convenient helper for passing sockets into another process";
+    homepage = "https://github.com/mitsuhiko/systemfd";
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.adisbladis ];
+    platforms = lib.platforms.unix;
+  };
+
 }