about summary refs log tree commit diff
path: root/users/sterni/nint
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-04-02T19·59+0200
committersterni <sternenseemann@systemli.org>2021-04-03T22·16+0000
commit0133fdc737286a678fbc46a97810dfb152588c77 (patch)
treec1900a1bb031a5af547d7843e79585a7ea4b8c37 /users/sterni/nint
parent3e7073f106dba0b97484935347b94b1c11db9b81 (diff)
chore: move all 3p buildRustCrate derivations to //third_party r/2419
Profpatsch and me are basically the only users of
depot.users.Profpatsch.writers.rustSimple*. To pull in the odd
dependency we usually use buildRustCrate which is rather convenient.
However we've picked up the bad habit of inlining these in a let
somewhere instead of managing them in a more central location although
there has been an (unsuccesful) attempt at this in
//users/Profpatsch/rust-crates.nix.

This CL moves all buildRustCrate based derivations into
third_party.rust-crates and deletes any duplicate derivations we have
accumulated in the tree.

Change-Id: I8f68b95ebd546708e9af07dca36d72dba9ca8c77
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2769
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/sterni/nint')
-rw-r--r--users/sterni/nint/default.nix41
1 files changed, 3 insertions, 38 deletions
diff --git a/users/sterni/nint/default.nix b/users/sterni/nint/default.nix
index 69ca7283a50f..a7952393c6db 100644
--- a/users/sterni/nint/default.nix
+++ b/users/sterni/nint/default.nix
@@ -4,46 +4,11 @@ let
   inherit (depot.users.Profpatsch.writers)
     rustSimpleBin
     ;
-
-  inherit (pkgs)
-    buildRustCrate
-    ;
-
-  serde = buildRustCrate {
-    pname = "serde";
-    crateName = "serde";
-    version = "1.0.123";
-    sha256 = "05xl2s1vpf3p7fi2yc9qlzw88d5ap0z3qmhmd7axa6pp9pn1s5xc";
-    features = [ "std" ];
-  };
-
-  ryu = buildRustCrate {
-    pname = "ryu";
-    version = "1.0.5";
-    crateName = "ryu";
-    sha256 = "060y2ln1csix593ingwxr2y3wl236ls0ly1ffkv39h5im7xydhrc";
-  };
-
-  itoa = buildRustCrate {
-    pname = "itoa";
-    version = "0.4.7";
-    crateName = "itoa";
-    sha256 = "0079jlkcmcaw37wljrvb6r3dqq15nfahkqnl5npvlpdvkg31k11x";
-  };
-
-  serde_json = buildRustCrate {
-    pname = "serde_json";
-    version = "1.0.62";
-    crateName = "serde_json";
-    sha256 = "0sgc8dycigq0nxr4j613m4q733alfb2i10s6nz80lsbbqgrka21q";
-    dependencies = [ serde ryu itoa ];
-    features = [ "std" ];
-    edition = "2018";
-  };
-
 in
 
   rustSimpleBin {
     name = "nint";
-    dependencies = [ serde_json ];
+    dependencies = [
+      depot.third_party.rust-crates.serde_json
+    ];
   } (builtins.readFile ./nint.rs)