mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00

We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, bison
|
|
, cmake
|
|
, flex
|
|
, perl
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "elkhound";
|
|
version = "unstable-2020-04-13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "WeiDUorg";
|
|
repo = pname;
|
|
rev = "a7eb4bb2151c00cc080613a770d37560f62a285c";
|
|
sha256 = "sha256-Y96OFpBNrD3vrKoEZ4KdJuI1Q4RmYANsu7H3ZzfaA6g=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs scripts
|
|
'';
|
|
|
|
sourceRoot = "${src.name}/src";
|
|
|
|
nativeBuildInputs = [ bison cmake flex perl ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm555 -t $out/bin ast/astgen elkhound/elkhound
|
|
for d in ast elkhound smbase; do
|
|
install -Dm444 -t $out/lib $d/*.a
|
|
install -Dm444 -t $out/include/$d $src/src/$d/*.h
|
|
done
|
|
install -Dm444 -t $out/share/doc/${pname} $src/src/elkhound/*.txt
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Parser generator which emits GLR parsers, either in OCaml or C++";
|
|
homepage = "https://scottmcpeak.com/elkhound/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
# possibly works on Darwin
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|