git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #89408 from jpotier/add-libucl
commit3e9434457f3582db788c792ab93bd924b7dcd771 authorJan Tojnar <jtojnar@gmail.com> dateFri 12 Jun 2020, 16:22 (6 years ago) parentcf29bf0a739d31
2 files changed+60
pkgs/development/libraries/libucl/default.nix+58 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/libucl/default.nixnew file+58
@@ -0,0 +1,58 @@
1+{ stdenv
2+, fetchFromGitHub
3+, pkg-config
4+, autoreconfHook
5+, curl
6+, lua
7+, openssl
8+, features ? {
9+ urls = false;
10+ # Upstream enables regex by default
11+ regex = true;
12+ # Signature support is broken with openssl 1.1.1: https://github.com/vstakhov/libucl/issues/203
13+ signatures = false;
14+ lua = false;
15+ utils = false;
16+ }
17+}:
18+
19+let
20+ featureDeps = {
21+ urls = [ curl ];
22+ signatures = [ openssl ];
23+ lua = [ lua ];
24+ };
25+in
26+stdenv.mkDerivation rec {
27+ pname = "libucl";
28+ version = "0.8.1";
29+
30+ src = fetchFromGitHub {
31+ owner = "vstakhov";
32+ repo = pname;
33+ rev = version;
34+ sha256 = "1h52ldxankyhbbm1qbqz1f2q0j03c1b4mig7343bs3mc6fpm18gf";
35+ };
36+
37+ nativeBuildInputs = [ pkg-config autoreconfHook ];
38+
39+ buildInputs = with stdenv.lib;
40+ concatLists (
41+ mapAttrsToList (feat: enabled:
42+ optionals enabled (featureDeps."${feat}" or [])
43+ ) features
44+ );
45+
46+ enableParallelBuilding = true;
47+
48+ configureFlags = with stdenv.lib;
49+ mapAttrsToList (feat: enabled: strings.enableFeature enabled feat) features;
50+
51+ meta = with stdenv.lib; {
52+ description = "Universal configuration library parser";
53+ homepage = "https://github.com/vstakhov/libucl";
54+ license = licenses.bsd2;
55+ platforms = platforms.unix;
56+ maintainers = with maintainers; [ jpotier ];
57+ };
58+}
pkgs/top-level/all-packages.nix+2
@@ -4991,6 +4991,8 @@ in
49914991
49924992 libiberty = callPackage ../development/libraries/libiberty { };
49934993
4994+ libucl = callPackage ../development/libraries/libucl { };
4995+
49944996 libxc = callPackage ../development/libraries/libxc { };
49954997
49964998 libxcomp = callPackage ../development/libraries/libxcomp { };