mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
patsh: 0.1.3 -> 0.2.0
Diff: https://github.com/nix-community/patsh/compare/v0.1.3...v0.2.0 Changelog: https://github.com/nix-community/patsh/blob/v0.2.0/CHANGELOG.md
This commit is contained in:
parent
93a6789538
commit
1830f9dc30
@ -1,30 +1,41 @@
|
||||
{ lib
|
||||
, runCommand
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, runCommand
|
||||
, tree-sitter
|
||||
, coreutils
|
||||
}:
|
||||
|
||||
let
|
||||
custom = runCommand "custom" { } ''
|
||||
mkdir -p $out/bin
|
||||
touch $out/bin/{'foo$','foo"`'}
|
||||
chmod +x $out/bin/{'foo$','foo"`'}
|
||||
'';
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "patsh";
|
||||
version = "0.1.3";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KmQVZwZC7KHlzNnL2IKQ76wHUDNUZKz/aFaY4ujvBo4=";
|
||||
sha256 = "sha256-7HXJspebluQeejKYmVA7sy/F3dtU1gc4eAbKiPexMMA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-vozQKBxAVELdqTnqBpgHX0Wyk18EZAtpiRsKjwz8xKE=";
|
||||
cargoSha256 = "sha256-R6ScpLYbEJAu7+CyJsMdljtXq7wsMojHK5O1lH+E/E8=";
|
||||
|
||||
# tests fail on darwin due to rpath issues
|
||||
doCheck = !stdenv.isDarwin;
|
||||
checkInputs = [ custom ];
|
||||
|
||||
TREE_SITTER_BASH = runCommand "tree-sitter-bash" { } ''
|
||||
mkdir $out
|
||||
ln -s ${tree-sitter.builtGrammars.tree-sitter-bash}/parser $out/libtree-sitter-bash.a
|
||||
postPatch = ''
|
||||
for file in tests/fixtures/*-expected.sh; do
|
||||
substituteInPlace $file \
|
||||
--subst-var-by cc ${stdenv.cc} \
|
||||
--subst-var-by coreutils ${coreutils} \
|
||||
--subst-var-by custom ${custom}
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user