about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/profpatsch/default.nix5
-rw-r--r--pkgs/profpatsch/execline/default.nix11
-rw-r--r--pkgs/profpatsch/nman/default.nix5
-rw-r--r--pkgs/profpatsch/write-rust.nix21
-rw-r--r--pkgs/sternenseemann/default.nix1
-rw-r--r--pkgs/sternenseemann/rust/default.nix6
6 files changed, 27 insertions, 22 deletions
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix
index c5f8ed94..61530859 100644
--- a/pkgs/profpatsch/default.nix
+++ b/pkgs/profpatsch/default.nix
@@ -128,7 +128,7 @@ in rec {
   git-commit-index = callPackage ./git-commit-index { inherit script; };
   nix-http-serve = callPackage ./nix-http-serve {};
   nman = callPackage ./nman {
-    inherit writeRustSimpleBin testRustSimple;
+    inherit writeRustSimpleBin;
     inherit (sternenseemann) temp;
   };
   sfttime = callPackage ./sfttime {};
@@ -171,7 +171,6 @@ in rec {
     writeRustSimple
     writeRustSimpleBin
     writeRustSimpleLib
-    testRustSimple
     ;
 
   inherit (runExeclineFns)
@@ -267,7 +266,7 @@ in rec {
     record-get
     ;
 
-  inherit (import ./execline/default.nix { inherit pkgs writeRustSimpleLib testRustSimple rust-deps; })
+  inherit (import ./execline/default.nix { inherit pkgs writeRustSimpleLib rust-deps; })
     el-semicolon
     el-exec
     el-substitute
diff --git a/pkgs/profpatsch/execline/default.nix b/pkgs/profpatsch/execline/default.nix
index 0f0807b5..45d616e2 100644
--- a/pkgs/profpatsch/execline/default.nix
+++ b/pkgs/profpatsch/execline/default.nix
@@ -1,11 +1,10 @@
-{ pkgs, writeRustSimpleLib, testRustSimple, rust-deps }:
+{ pkgs, writeRustSimpleLib, rust-deps }:
 
 let
-  el-semicolon = testRustSimple
-    (writeRustSimpleLib "el_semicolon" {
-      release = false;
-      verbose = true;
-    } ./el_semicolon.rs);
+  el-semicolon = writeRustSimpleLib "el_semicolon" {
+    release = false;
+    verbose = true;
+  } ./el_semicolon.rs;
 
   el-exec = writeRustSimpleLib "el_exec" {
     dependencies = [ rust-deps.libc ];
diff --git a/pkgs/profpatsch/nman/default.nix b/pkgs/profpatsch/nman/default.nix
index f03c4502..31461999 100644
--- a/pkgs/profpatsch/nman/default.nix
+++ b/pkgs/profpatsch/nman/default.nix
@@ -1,10 +1,9 @@
 { lib
 , writeRustSimpleBin
-, testRustSimple
 , temp
 }:
 
-testRustSimple (writeRustSimpleBin "nman" {
+writeRustSimpleBin "nman" {
   meta = {
     license = lib.licenses.gpl3Only;
     description = "Open man page in a temporary nix-shell";
@@ -15,4 +14,4 @@ testRustSimple (writeRustSimpleBin "nman" {
   postInstall = ''
     install -Dm644 ${./nman.1} "$out/share/man/man1/nman.1"
   '';
-} ./nman.rs)
+} ./nman.rs
diff --git a/pkgs/profpatsch/write-rust.nix b/pkgs/profpatsch/write-rust.nix
index 1c02c014..13ba6b82 100644
--- a/pkgs/profpatsch/write-rust.nix
+++ b/pkgs/profpatsch/write-rust.nix
@@ -10,7 +10,13 @@ let
     "if" [ bins.s6-ln "-sL" path "$out" ]
   ];
 
-  writeRustSimpleBin = name: { dependencies ? [], ... }@args: srcFile: pkgs.buildRustCrate ({
+  writeRustSimpleBin = name: {
+    dependencies ? [],
+    doCheck ? true,
+    ...
+  }@args: srcFile:
+    (if doCheck then testRustSimple else pkgs.lib.id)
+    (pkgs.buildRustCrate ({
       pname = name;
       version = "1.0.0";
       crateName = name;
@@ -21,9 +27,15 @@ let
         cp ${srcFile} $out/src/bin/${name}.rs
         find $out
       '';
-    } // args);
+    } // args));
 
-  writeRustSimpleLib = name: { dependencies ? [], ... }@args: srcFile: pkgs.buildRustCrate ({
+  writeRustSimpleLib = name: {
+    dependencies ? [],
+    doCheck ? true,
+    ...
+  }@args: srcFile:
+    (if doCheck then testRustSimple else pkgs.lib.id)
+    (pkgs.buildRustCrate ({
       pname = name;
       version = "1.0.0";
       crateName = name;
@@ -33,7 +45,7 @@ let
         cp ${srcFile} $out/src/lib.rs
         find $out
       '';
-    } // args);
+    } // args));
 
   /* Takes a `buildRustCrate` derivation as an input,
     * builds it with `{ buildTests = true; }` and runs
@@ -65,6 +77,5 @@ in {
     writeRustSimple
     writeRustSimpleBin
     writeRustSimpleLib
-    testRustSimple
     ;
 }
diff --git a/pkgs/sternenseemann/default.nix b/pkgs/sternenseemann/default.nix
index 1a348a08..2b4e4888 100644
--- a/pkgs/sternenseemann/default.nix
+++ b/pkgs/sternenseemann/default.nix
@@ -37,7 +37,6 @@ let
     inherit (profpatsch)
       writeRustSimpleBin
       writeRustSimpleLib
-      testRustSimple
       ;
   };
 
diff --git a/pkgs/sternenseemann/rust/default.nix b/pkgs/sternenseemann/rust/default.nix
index bc4e785b..b04c270e 100644
--- a/pkgs/sternenseemann/rust/default.nix
+++ b/pkgs/sternenseemann/rust/default.nix
@@ -1,18 +1,16 @@
 { writeRustSimpleLib
 , writeRustSimpleBin
-, testRustSimple
 }:
 
 let
 
-  temp = testRustSimple
-    (writeRustSimpleLib "temp" {
+  temp = writeRustSimpleLib "temp" {
       release = false;
       verbose = true;
       meta = {
         description = "Tiny temp dir/file crate for rust";
       };
-    } ./temp.rs);
+    } ./temp.rs;
 
   nix-env-diff = writeRustSimpleBin "nix-env-diff" {
     meta = {