Skip to content

Instantly share code, notes, and snippets.

@cole-h

cole-h/log Secret

Last active December 1, 2021 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cole-h/424a8265ce97cdc68ed264efbb39e14d to your computer and use it in GitHub Desktop.
Save cole-h/424a8265ce97cdc68ed264efbb39e14d to your computer and use it in GitHub Desktop.
this derivation will be built:
/nix/store/8dy91d6paayh74s8x84vh393hcgxp9jr-a-b.drv
building '/nix/store/8dy91d6paayh74s8x84vh393hcgxp9jr-a-b.drv'...
unpacking sources
unpacking source archive /nix/store/zpga4wmmpc1knwyp6bi7g4crk18jf7hr-resholve
source root is resholve
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
post-installation fixup
[resholve context] : changing directory to /nix/store/2i6m2hnmqg896ivybl018dylbkg0kpl2-a-b
[resholve context] RESHOLVE_LORE=/nix/store/i33a9kfkfd59hh3falkf7k6dcr4qk8p3-more-binlore
[resholve context] RESHOLVE_INPUTS=/nix/store/220vwl17jy619jfrmifarw09sgfdkvr9-gnused-4.8/bin
[resholve context] RESHOLVE_INTERPRETER=/nix/store/svxmj4xahyjqq4lciisvgi1fwl5bxpdd-bash-5.1-p8/bin/bash
[resholve context] /nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/resholve --overwrite bin/resholve.sh
Traceback (most recent call last):
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 4547, in <module>
sys.exit(punshow())
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 912, in punshow
resolve_cmdlikes()
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 2953, in resolve_cmdlikes
cmdlike.resolve()
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 2925, in resolve
self._resolve_invocations(solution)
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 2891, in _resolve_invocations
source.look_for_external_sub_execution(self.name, invocation)
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 3870, in look_for_external_sub_execution
if handler(parsed, invocation):
File "/nix/store/7hdbdvgdlxgycvvmk336ankpzdlqy175-resholve-0.6.8/bin/.resholve-wrapped", line 3544, in handle_external_sed
word=parsed.script.ast,
AttributeError: 'Namespace' object has no attribute 'script'
#!/usr/bin/env bash
sed -i "1p" /mnt/etc
let
pkgs = import <nixpkgs> { };
in
pkgs.resholvePackage {
pname = "a";
version = "b";
src = ./.;
installPhase = ''
mkdir -p $out/bin
cp resholve.sh $out/bin
'';
solutions.default = {
scripts = [ "bin/resholve.sh" ];
interpreter = "${pkgs.bash}/bin/bash";
inputs = [ pkgs.gnused ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment