nixpkgs/pkgs/development/libraries/qrcodegen/default.nix

41 lines
874 B
Nix
Raw Normal View History

2022-01-07 13:26:36 +00:00
{ lib
, stdenv
, fetchFromGitHub
}:
2020-12-19 13:49:13 +00:00
stdenv.mkDerivation rec {
pname = "qrcodegen";
2021-08-17 16:35:15 +00:00
version = "1.7.0";
2020-12-19 13:49:13 +00:00
src = fetchFromGitHub {
owner = "nayuki";
repo = "QR-Code-generator";
rev = "v${version}";
2021-08-17 16:35:15 +00:00
sha256 = "sha256-WH6O3YE/+NNznzl52TXZYL+6O25GmKSnaFqDDhRl4As=";
2020-12-19 13:49:13 +00:00
};
2022-01-07 13:26:36 +00:00
preBuild = ''
cd c/
'';
2020-12-19 13:49:13 +00:00
installPhase = ''
2022-01-07 13:26:36 +00:00
runHook preInstall
2020-12-19 13:49:13 +00:00
mkdir -p $out/lib $out/include/qrcodegen
cp libqrcodegen.a $out/lib
cp qrcodegen.h $out/include/qrcodegen/
2022-01-07 13:26:36 +00:00
runHook postInstall
'';
2020-12-19 13:49:13 +00:00
2022-01-07 13:26:36 +00:00
meta = with lib; {
homepage = "https://www.nayuki.io/page/qr-code-generator-library";
description = "High-quality QR Code generator library in many languages";
license = licenses.mit;
maintainers = with maintainers; [ mcbeth AndersonTorres ];
platforms = platforms.unix;
};
2020-12-19 13:49:13 +00:00
}
2022-01-07 13:26:36 +00:00
# TODO: build the other languages
# TODO: multiple outputs