about summary refs log tree commit diff
path: root/users/Profpatsch/netencode/default.nix
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/Profpatsch/netencode/default.nix
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/Profpatsch/netencode/default.nix')
-rw-r--r--users/Profpatsch/netencode/default.nix42
1 files changed, 2 insertions, 40 deletions
diff --git a/users/Profpatsch/netencode/default.nix b/users/Profpatsch/netencode/default.nix
index dabf640d51..206e382c74 100644
--- a/users/Profpatsch/netencode/default.nix
+++ b/users/Profpatsch/netencode/default.nix
@@ -10,7 +10,7 @@ let
     (imports.writers.rustSimpleLib {
       name = "netencode";
       dependencies = [
-        depot.users.Profpatsch.rust-crates.nom
+        depot.third_party.rust-crates.nom
         depot.users.Profpatsch.execline.exec-helpers
       ];
       release = false;
@@ -19,50 +19,12 @@ let
 
   gen = import ./gen.nix { inherit lib; };
 
-  cfg-if = pkgs.buildRustCrate {
-    pname = "cfg-if";
-    version = "1.0.0";
-    crateName = "cfg-if";
-    sha256 = "1fzidq152hnxhg4lj6r2gv4jpnn8yivp27z6q6xy7w6v0dp6bai9";
-  };
-
-  log = pkgs.buildRustCrate {
-    pname = "log";
-    version = "0.4.11";
-    crateName = "log";
-    sha256 = "0m6xhqxsps5mgd7r91g5mqkndbh8zbjd58p7w75r330zl4n40l07";
-    dependencies = [ cfg-if ];
-  };
-
-  serde_derive = pkgs.buildRustCrate {
-    pname = "serde";
-    crateName = "serde";
-    version = "1.0.123";
-    sha256 = "05xl2s1vpf3p7fi2yc9qlzw88d5ap0z3qmhmd7axa6pp9pn1s5xc";
-  };
-
-  serde = pkgs.buildRustCrate {
-    pname = "serde";
-    crateName = "serde";
-    version = "1.0.123";
-    sha256 = "05xl2s1vpf3p7fi2yc9qlzw88d5ap0z3qmhmd7axa6pp9pn1s5xc";
-    features = [ "std" ];
-  };
-
-  mustache = pkgs.buildRustCrate {
-    pname = "mustache";
-    version = "0.9.0";
-    crateName = "mustache";
-    sha256 = "1zgl8l15i19lzp90icgwyi6zqdd31b9vm8w129f41d1zd0hs7ayq";
-    dependencies = [ log serde ];
-  };
-
   netencode-mustache = imports.writers.rustSimple {
     name = "netencode_mustache";
     dependencies = [
       depot.users.Profpatsch.arglib.netencode.rust
       netencode-rs
-      mustache
+      depot.third_party.rust-crates.mustache
     ];
   } (builtins.readFile ./netencode-mustache.rs);