mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 13:53:24 +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.
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, bzip2
|
|
, cmake
|
|
, fetchFromGitHub
|
|
, gtest
|
|
, pkg-config
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "sexpp";
|
|
version = "0.9.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rnpgp";
|
|
repo = "sexpp";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-mNt6J8nhzT5sF28ktl3jOkQMKn6x9iE04MMrwwVxyZs=";
|
|
};
|
|
|
|
buildInputs = [ zlib bzip2 ];
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
"-DBUILD_SHARED_LIBS=on"
|
|
"-DWITH_SEXP_TESTS=on"
|
|
"-DDOWNLOAD_GTEST=off"
|
|
"-DWITH_SEXP_CLI=on"
|
|
"-DWITH_SANITIZERS=off"
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake gtest pkg-config ];
|
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
preConfigure = ''
|
|
echo "v${finalAttrs.version}" > version.txt
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/rnpgp/sexp";
|
|
description = "S-expressions parser and generator C++ library, fully compliant to [https://people.csail.mit.edu/rivest/Sexp.txt]";
|
|
mainProgram = "sexpp";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ ribose-jeffreylau ];
|
|
};
|
|
})
|