From 21b782b09e0c392a9111adb24d0d8263d37759c6 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 20 Nov 2021 19:34:30 +0100 Subject: pkgs/profpatsch: better way to override nixpkgs in tvl --- pkgs/profpatsch/default.nix | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'pkgs/profpatsch') diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix index 86c9a6ec..cc8d0629 100644 --- a/pkgs/profpatsch/default.nix +++ b/pkgs/profpatsch/default.nix @@ -101,36 +101,39 @@ 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. - tvlSrc = { tvlCommit, tvlSha256, nixpkgsPath }: + # # 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 = '' - /stableNixpkgs =/ { sub("stableNixpkgsSrc", "${nixpkgsPath}"); print } - !/stableNixpkgs =/ { print } - ''; + # bins = getBins pkgs.gawk [ "gawk" ] + # // getBins pkgs.coreutils [ "cp" ]; + # gawkScript = '' + # /stableNixpkgs =/ { sub("stableNixpkgsSrc", "${nixpkgsPath}"); print } + # !/stableNixpkgs =/ { print } + # ''; src = pkgs.fetchgit { url = "https://code.tvl.fyi/depot.git"; rev = tvlCommit; # 2021-11-13 sha256 = tvlSha256; }; - prepareSource = runExeclineFns.runExeclineLocal "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 prepareSource; + # prepareSource = runExeclineFns.runExeclineLocal "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 prepareSource; + in import src { + nixpkgsBisectPath = nixpkgsPath; + }; in rec { tvl = - import (tvlSrc { + importTvl { tvlCommit = "e2fbc10ebdb5d85813fd15c5dd371ee8e1e87a22"; # 2021-11-13 tvlSha256 = "14hrzx31a7bas64n8rz89388nwfhmy77l5s85g82vvzd5fxg61by"; nixpkgsPath = import ../../nixpkgs-path.nix; - }) {}; + }; inherit (nixperiments) -- cgit 1.4.1