Skip to content

Commit

Permalink
[WIP] much work, very progress
Browse files Browse the repository at this point in the history
  • Loading branch information
abathur committed May 3, 2021
1 parent 591ae30 commit 52faf74
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 20 deletions.
30 changes: 30 additions & 0 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ let
inherit (callPackage ./default.nix { })
resholve resholvePackage;

# binlore = pkgs.callPackage ../binlore { };
binlore = callPackage (fetchFromGitHub {
owner = "abathur";
repo = "binlore";
rev = "73db2f951d7318a9a401583445b737728d52153e";
hash = "sha256-puUiXxmdV31Mh1MQmFdT+ukv4hkNujavMui2U46hYd8=";
}) { };

/* TODO: wrapped copy of find so that we can eventually test
our ability to see through wrappers. Unused for now. */
wrapfind = runCommand "wrapped-find" { } ''
source ${makeWrapper}/nix-support/setup-hook
makeWrapper ${findutils}/bin/find $out/bin/wrapped-find
'';
/* TODO:
unrelated, but is there already a function (or would
there be demand for one?) along the lines of:
wrap = { drv, executable(s?), args ? { } }: that:
- generates a sane output name
- sources makewrapper
- retargets real executable if already wrapped
- wraps the executable
I wonder because my first thought here was overrideAttrs,
but I realized rebuilding just for a custom wrapper is an
ongoing waste of time. If it is a common pattern in the
wild, it would be a nice QoL improvement.
*/

shunit2 = with pkgs.shunit2;
resholvePackage {
inherit pname src version installPhase;
Expand Down Expand Up @@ -136,6 +165,7 @@ stdenv.mkDerivation {
checkInputs = [ bats ];

RESHOLVE_PATH = "${lib.makeBinPath resolveTimeDeps}";
RESHOLVE_LORE = "${binlore.collect { drvs = resolveTimeDeps; } }/execers";

This comment has been minimized.

Copy link
@abathur

abathur May 3, 2021

Author Owner

This uses binlore to collect a ~guess at which paths are/aren't execers

This comment has been minimized.

Copy link
@abathur

# explicit interpreter for demo suite; maybe some better way...
INTERP = "${bash}/bin/bash";
Expand Down
12 changes: 10 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
, doCheck ? true
}:

with pkgs; rec
let
# binlore = pkgs.callPackage ../binlore { };
binlore = pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "abathur";
repo = "binlore";
rev = "73db2f951d7318a9a401583445b737728d52153e";
hash = "sha256-puUiXxmdV31Mh1MQmFdT+ukv4hkNujavMui2U46hYd8=";
}) { };
in with pkgs; rec
{
resholve = callPackage ./resholve.nix { inherit doCheck; };
resholvePackage =
callPackage ./resholve-package.nix { inherit resholve; };
callPackage ./resholve-package.nix { inherit resholve; inherit binlore; };
}
Loading

0 comments on commit 52faf74

Please sign in to comment.