diff options
-rw-r--r-- | pkgs/default.nix | 11 | ||||
-rw-r--r-- | pkgs/profpatsch/default.nix | 38 | ||||
-rw-r--r-- | pkgs/tvl/default.nix | 12 |
3 files changed, 23 insertions, 38 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index a508a060..94fa4116 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,12 @@ { pkgs ? import (import ../nixpkgs-path.nix) {} }: let - inherit (pkgs.lib) callPackageWith; + inherit (pkgs.lib) + callPackageWith + recurseIntoAttrs + dontRecurseIntoAttrs + ; + callPackage = callPackageWith (pkgs // self.vuizvui); callPackage_i686 = callPackageWith (pkgs.pkgsi686Linux // self.vuizvui); @@ -10,7 +15,7 @@ let pkgsi686Linux = pkgs.pkgsi686Linux // self.vuizvui; }; - self.vuizvui = pkgs.recurseIntoAttrs { + self.vuizvui = recurseIntoAttrs { mkChannel = callPackage ./build-support/channel.nix { }; buildSandbox = callPackage ./build-support/build-sandbox {}; lazy-packages = callPackage ./build-support/lazy-packages {}; @@ -30,5 +35,7 @@ let openlab = callPackageScope ./openlab; profpatsch = callPackageScope ./profpatsch; sternenseemann = callPackageScope ./sternenseemann; + + tvl = dontRecurseIntoAttrs (callPackage ./tvl { }); }; in self.vuizvui 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 diff --git a/pkgs/tvl/default.nix b/pkgs/tvl/default.nix new file mode 100644 index 00000000..f84e3fa3 --- /dev/null +++ b/pkgs/tvl/default.nix @@ -0,0 +1,12 @@ +{ tvlSrc ? builtins.fetchGit { + name = "tvl-depot"; + url = "https://code.tvl.fyi"; + rev = "98371362f25202f8afae3949b618b0db78d5ea1d"; + ref = "canon"; + } +, pkgs +}: + +import tvlSrc { + nixpkgsBisectPath = pkgs.path; # TODO: does this improve eval time significantly? +} |