about summary refs log tree commit diff
path: root/pkgs/profpatsch
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-06 11:53:48 +0100
committersterni <sternenseemann@systemli.org>2022-03-24 09:26:17 +0100
commit99ab2a7400c981ca89c72dc8ad1038cb89dc9b12 (patch)
treed42e09d65a4bd33a12a1322e11d29696aa904da2 /pkgs/profpatsch
parentf5f600e3908b4b00714a9658c2708b825322a137 (diff)
pkgs/tvl: expose tvl's depot in vuizvui
depot is a nix-based monorepo which contains some great nix utilities
like yants (a nix type system), runTestsuite, mergePatch and so on, a
few interesting pure nix builders like buildLisp and buildGo and a few
packages maintained by @Profpatsch and myself.

This change exposes tvl completely as pkgs.tvl, but prevents hydra from
building it using dontRecurseIntoAttrs as depot pins its own version of
nixpkgs which is not easily overrideable, contains some expensive to
build system configurations we are not interested in and even some
notoriously indeterministic packages.

Additionally it is possible to override pkgs.tvl to use a different or
local version of depot:

    pkgs.tvl.override { tvlSrc = /home/lukas/src/depot; }

To keep with @Profpatsch's previous solution, we pass in vuizvui's
nixpkgs version to depot via nixpkgsBisectPath which may break packages
in depot occasionally if nixpkgs causes breakage in TVL and depot isn't
updated accordingly.
Diffstat (limited to 'pkgs/profpatsch')
-rw-r--r--pkgs/profpatsch/default.nix38
1 files changed, 2 insertions, 36 deletions
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix
index 149f2198..680831f2 100644
--- a/pkgs/profpatsch/default.nix
+++ b/pkgs/profpatsch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, pkgs, sternenseemann, lazy-packages }:
+{ stdenv, lib, pkgs, sternenseemann, tvl, lazy-packages }:
 
 let
   inherit (pkgs) callPackage;
@@ -106,41 +106,7 @@ let
 
   writeExeclineFns = callPackage ./execline/write-execline.nix {};
 
-  # # Fetch the tvl source at commit, and replac the nixpkgs version it depends
-  # # on with the given nixpkgsPath.
-  importTvl = { tvlCommit, tvlSha256, nixpkgsPath }:
-    let
-      bins = getBins pkgs.gawk [ "gawk" ]
-          // getBins pkgs.coreutils [ "cp" ];
-      gawkScript = ''
-        # patch out emacs overlay (requires fetching the overlay with builtins.fetchTarball)
-        /depot.third_party.overlays.emacs/ { sub("^", "#") }
-        1 { print }
-      '';
-      src = pkgs.fetchgit {
-        url = "https://code.tvl.fyi/depot.git";
-        rev = tvlCommit;
-        sha256 = tvlSha256;
-      };
-      prepareSource = runExeclineFns.runExeclineLocalNoSeqL "prepare-tvl" {} [
-        "importas" "out" "out"
-        "if" [ bins.cp "--no-preserve=mode" "-r" src "$out" ]
-        bins.gawk "-i" "inplace" gawkScript "\${out}/third_party/nixpkgs/default.nix"
-      ];
-    in import prepareSource {
-      nixpkgsBisectPath = nixpkgsPath;
-    };
-
-
 in rec {
-  # tvl = import /home/philip/depot {};
-  tvl =
-    importTvl {
-      tvlCommit = "72b46e8fe80d9c8c708602387b4d46cce6bb266d"; # 2022-02-28
-      tvlSha256 = "sha256-uWrsbMWe3CZVlsstMrJB4HP3tzU8GgFB7VAsanUBI2g=";
-      nixpkgsPath = pkgs.path;
-    };
-
 
   inherit (nixperiments)
     # canonical pattern matching primitive
@@ -250,7 +216,7 @@ in rec {
   };
 
   inherit (import ./profpatsch.de {
-    inherit pkgs tvl lib
+    inherit pkgs lib tvl
       toNetstring toNetstringList writeExecline runExecline getBins writeRustSimple netencode-rs el-semicolon el-exec el-substitute netencode record-get;
   })
     websiteStatic