diff options
Diffstat (limited to 'nixpkgs/pkgs/by-name/qr/qrcodegencpp/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/qr/qrcodegencpp/package.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/qr/qrcodegencpp/package.nix b/nixpkgs/pkgs/by-name/qr/qrcodegencpp/package.nix new file mode 100644 index 000000000000..655b948e81e1 --- /dev/null +++ b/nixpkgs/pkgs/by-name/qr/qrcodegencpp/package.nix @@ -0,0 +1,32 @@ +{ lib +, stdenv +, qrcodegen +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "qrcodegencpp"; + version = qrcodegen.version; + + src = qrcodegen.src; + + sourceRoot = "${finalAttrs.src.name}/cpp"; + + nativeBuildInputs = lib.optionals stdenv.cc.isClang [ + stdenv.cc.cc.libllvm.out + ]; + + makeFlags = lib.optionals stdenv.cc.isClang [ "AR=llvm-ar" ]; + + installPhase = '' + runHook preInstall + + install -Dt $out/lib/ libqrcodegencpp.a + install -Dt $out/include/qrcodegen/ qrcodegen.hpp + + runHook postInstall + ''; + + meta = { + inherit (qrcodegen.meta) description homepage license maintainers platforms; + }; +}) |