mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
571c71e6f7
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.
47 lines
1.0 KiB
Nix
47 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "jtc";
|
|
version = "1.76";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ldn-softdev";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-VATRlOOV4wBInLOm9J0Dp2vhtL5mb0Yxdl/ya0JiqEU=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix building with Clang. Removing with next release.
|
|
(fetchpatch {
|
|
url = "https://github.com/ldn-softdev/jtc/commit/92a5116e5524c0b6d2f539db7b5cc9fdd7c5b8ab.patch";
|
|
sha256 = "sha256-AAvDH0XsT8/CAguG611/odg0m1HR+veC0jbAw6KLHLM=";
|
|
})
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
$CXX -o jtc -Wall -std=gnu++14 -Ofast -pthread -lpthread jtc.cpp
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin jtc
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "JSON manipulation and transformation tool";
|
|
mainProgram = "jtc";
|
|
homepage = "https://github.com/ldn-softdev/jtc";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|