10 # copied from flake.nix
11 # tests require extra setup with nix
12 custom = runCommand "custom" { } ''
14 touch $out/bin/{'foo$','foo"`'}
15 chmod +x $out/bin/{'foo$','foo"`'}
19 rustPlatform.buildRustPackage rec {
23 src = fetchFromGitHub {
24 owner = "nix-community";
27 sha256 = "sha256-d2Br4RAlKO7Bpse8sFbIDCIYd2fYvby0ar9oIbQS2jc=";
30 cargoHash = "sha256-hAWMm3YjwTB8ajn3QeXEOJYmPzbbitdwyO4k/IyhlOI=";
32 nativeCheckInputs = [ custom ];
34 # see comment on `custom`
36 for file in tests/fixtures/*-expected.sh; do
37 substituteInPlace $file \
38 --subst-var-by cc ${stdenv.cc} \
39 --subst-var-by coreutils ${coreutils} \
40 --subst-var-by custom ${custom}
45 description = "Command-line tool for patching shell scripts inspired by resholve";
46 mainProgram = "patsh";
47 homepage = "https://github.com/nix-community/patsh";
48 changelog = "https://github.com/nix-community/patsh/blob/v${version}/CHANGELOG.md";
49 license = licenses.mpl20;
50 maintainers = with maintainers; [ figsoda ];