nix flake
This commit is contained in:
38
package.nix
Normal file
38
package.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
cppcheck,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nbt-cpp";
|
||||
version = "0-unstable-2026-05-05";
|
||||
|
||||
src = lib.cleanSource ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
cppcheck
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace meson.build \
|
||||
--replace-fail "version : run_command('git', 'describe', '--abbrev=0', '--tags').stdout().strip()," \
|
||||
"version : '${finalAttrs.version}',"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "NBT library and converter for C++17";
|
||||
homepage = "https://github.com/HandTruth/nbt-cpp";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user