Files
nixpkgs/pkgs/by-name/li/libbgcode/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

53 lines
973 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
heatshrink,
zlib,
boost,
catch2_3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libbgcode";
version = "0-unstable-2025-02-19";
src = fetchFromGitHub {
owner = "prusa3d";
repo = "libbgcode";
rev = "5041c093b33e2748e76d6b326f2251310823f3df";
hash = "sha256-EaxVZerH2v8b1Yqk+RW/r3BvnJvrAelkKf8Bd+EHbEc=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
heatshrink
zlib
boost
];
checkInputs = [
catch2_3
];
doCheck = true;
cmakeFlags = [
(lib.cmakeBool "LibBGCode_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
];
meta = {
homepage = "https://github.com/prusa3d/libbgcode";
description = "Prusa Block & Binary G-code reader / writer / converter";
mainProgram = "bgcode";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ lach ];
platforms = lib.platforms.unix;
};
})