diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 17:58:16 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 17:58:16 -0500 |
commit | 43d5c5d6db3ce33f3cf1d17ba43c7374257466ec (patch) | |
tree | 3d24a5c3adc8f42ee14084889f2d9a9acaef5ef1 /lib | |
parent | 992bd2f6d34b2f560fc17df6fa3708fcade1abac (diff) | |
parent | 703a9f93c1254f7bdf0350ca0462de0d78033c62 (diff) | |
download | nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.gz nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.bz2 nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.lz nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.xz nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.zst nixpkgs-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.zip |
Merge commit '703a9f93c1254f7bdf0350ca0462de0d78033c62' into gcc-simplify-flags
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 1 | ||||
-rw-r--r-- | lib/generators.nix | 14 | ||||
-rw-r--r-- | lib/licenses.nix | 22 | ||||
-rw-r--r-- | lib/maintainers.nix | 16 | ||||
-rw-r--r-- | lib/sandbox.nix | 48 | ||||
-rw-r--r-- | lib/tests/misc.nix | 2 |
6 files changed, 46 insertions, 57 deletions
diff --git a/lib/default.nix b/lib/default.nix index 3e30ec515fc..9dc4fea99fc 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -41,7 +41,6 @@ let generators = callLibs ./generators.nix; misc = callLibs ./deprecated.nix; # domain-specific - sandbox = callLibs ./sandbox.nix; fetchers = callLibs ./fetchers.nix; # Eval-time filesystem handling diff --git a/lib/generators.nix b/lib/generators.nix index 5f9da234f44..b27ab485f41 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -22,11 +22,15 @@ rec { * character sep. If sep appears in k, it is escaped. * Helper for synaxes with different separators. * - * mkKeyValueDefault ":" "f:oo" "bar" + * mkValueString specifies how values should be formatted. + * + * mkKeyValueDefault {} ":" "f:oo" "bar" * > "f\:oo:bar" */ - mkKeyValueDefault = sep: k: v: - "${libStr.escape [sep] k}${sep}${toString v}"; + mkKeyValueDefault = { + mkValueString ? toString + }: sep: k: v: + "${libStr.escape [sep] k}${sep}${mkValueString v}"; /* Generate a key-value-style config file from an attrset. @@ -34,7 +38,7 @@ rec { * mkKeyValue is the same as in toINI. */ toKeyValue = { - mkKeyValue ? mkKeyValueDefault "=" + mkKeyValue ? mkKeyValueDefault {} "=" }: attrs: let mkLine = k: v: mkKeyValue k v + "\n"; in libStr.concatStrings (libAttr.mapAttrsToList mkLine attrs); @@ -64,7 +68,7 @@ rec { # apply transformations (e.g. escapes) to section names mkSectionName ? (name: libStr.escape [ "[" "]" ] name), # format a setting line from key and value - mkKeyValue ? mkKeyValueDefault "=" + mkKeyValue ? mkKeyValueDefault {} "=" }: attrsOfAttrs: let # map function to string for each key val diff --git a/lib/licenses.nix b/lib/licenses.nix index cbd737dc57f..1f2c448470b 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -15,7 +15,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { afl21 = spdx { spdxId = "AFL-2.1"; - fullName = "Academic Free License"; + fullName = "Academic Free License v2.1"; + }; + + afl3 = spdx { + spdxId = "AFL-3.0"; + fullName = "Academic Free License v3.0"; }; agpl3 = spdx { @@ -426,6 +431,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { fullName = "Notion modified LGPL"; }; + nposl3 = spdx { + spdxId = "NPOSL-3.0"; + fullName = "Non-Profit Open Software License 3.0"; + }; + ofl = spdx { spdxId = "OFL-1.1"; fullName = "SIL Open Font License 1.1"; @@ -441,6 +451,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { fullName = "OpenSSL License"; }; + osl21 = spdx { + spdxId = "OSL-2.1"; + fullName = "Open Software License 2.1"; + }; + + osl3 = spdx { + spdxId = "OSL-3.0"; + fullName = "Open Software License 3.0"; + }; + php301 = spdx { spdxId = "PHP-3.01"; fullName = "PHP License v3.01"; diff --git a/lib/maintainers.nix b/lib/maintainers.nix index f09869cda2d..02ea550e84b 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -62,11 +62,12 @@ asppsa = "Alastair Pharo <asppsa@gmail.com>"; astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>"; asymmetric = "Lorenzo Manacorda <lorenzo@mailbox.org>"; - aszlig = "aszlig <aszlig@redmoonstudios.org>"; + aszlig = "aszlig <aszlig@nix.build>"; auntie = "Jonathan Glines <auntieNeo@gmail.com>"; avnik = "Alexander V. Nikolaev <avn@avnik.info>"; aycanirican = "Aycan iRiCAN <iricanaycan@gmail.com>"; bachp = "Pascal Bach <pascal.bach@nextrem.ch>"; + backuitist = "Bruno Bieth"; badi = "Badi' Abdul-Wahid <abdulwahidc@gmail.com>"; balajisivaraman = "Balaji Sivaraman <sivaraman.balaji@gmail.com>"; barrucadu = "Michael Walker <mike@barrucadu.co.uk>"; @@ -111,6 +112,7 @@ changlinli = "Changlin Li <mail@changlinli.com>"; chaoflow = "Florian Friesdorf <flo@chaoflow.net>"; chattered = "Phil Scott <me@philscotted.com>"; + ChengCat = "Yucheng Zhang <yu@cheng.cat>"; choochootrain = "Hurshal Patel <hurshal@imap.cc>"; chpatrick = "Patrick Chilton <chpatrick@gmail.com>"; chris-martin = "Chris Martin <ch.martin@gmail.com>"; @@ -118,6 +120,7 @@ chrisrosset = "Christopher Rosset <chris@rosset.org.uk>"; christopherpoole = "Christopher Mark Poole <mail@christopherpoole.net>"; ciil = "Simon Lackerbauer <simon@lackerbauer.com>"; + ck3d = "Christian Kögler <ck3d@gmx.de>"; ckampka = "Christian Kampka <christian@kampka.net>"; ckauhaus = "Christian Kauhaus <christian@kauhaus.de>"; cko = "Christine Koppelt <christine.koppelt@gmail.com>"; @@ -144,6 +147,7 @@ DamienCassou = "Damien Cassou <damien@cassou.me>"; danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>"; dancek = "Hannu Hartikainen <hannu.hartikainen@gmail.com>"; + danharaj = "Dan Haraj <dan@obsidian.systems>"; danielfullmer = "Daniel Fullmer <danielrf12@gmail.com>"; dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>"; david50407 = "David Kuo <me@davy.tw>"; @@ -218,6 +222,7 @@ falsifian = "James Cook <james.cook@utoronto.ca>"; fare = "Francois-Rene Rideau <fahree@gmail.com>"; fgaz = "Francesco Gazzetta <francygazz@gmail.com>"; + FireyFly = "Jonas Höglund <nix@firefly.nu>"; flokli = "Florian Klink <flokli@flokli.de>"; florianjacob = "Florian Jacob <projects+nixos@florianjacob.de>"; flosse = "Markus Kohlhase <mail@markus-kohlhase.de>"; @@ -282,6 +287,7 @@ infinisil = "Silvan Mosberger <infinisil@icloud.com>"; ironpinguin = "Michele Catalano <michele@catalano.de>"; ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>"; + ixmatus = "Parnell Springmeyer <parnell@digitalmentat.com>"; j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>"; jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>"; jammerful = "jammerful <jammerful@gmail.com>"; @@ -325,6 +331,7 @@ kaiha = "Kai Harries <kai.harries@gmail.com>"; kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>"; kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>"; + karolchmist = "karolchmist <info+nix@chmist.com>"; kentjames = "James Kent <jameschristopherkent@gmail.com"; kevincox = "Kevin Cox <kevincox@kevincox.ca>"; khumba = "Bryan Gardiner <bog@khumba.net>"; @@ -409,11 +416,13 @@ michelk = "Michel Kuhlmann <michel@kuhlmanns.info>"; midchildan = "midchildan <midchildan+nix@gmail.com>"; mikefaille = "Michaël Faille <michael@faille.io>"; + mikoim = "Eshin Kunishima <ek@esh.ink>"; miltador = "Vasiliy Solovey <miltador@yandex.ua>"; mimadrid = "Miguel Madrid <mimadrid@ucm.es>"; mirdhyn = "Merlin Gaillard <mirdhyn@gmail.com>"; mirrexagon = "Andrew Abbott <mirrexagon@mirrexagon.com>"; mjanczyk = "Marcin Janczyk <m@dragonvr.pl>"; + mjp = "Mike Playle <mike@mythik.co.uk>"; # github = "MikePlayle"; mlieberman85 = "Michael Lieberman <mlieberman85@gmail.com>"; modulistic = "Pablo Costa <modulistic@gmail.com>"; mog = "Matthew O'Gorman <mog-lists@rldn.net>"; @@ -481,6 +490,7 @@ patternspandemic = "Brad Christensen <patternspandemic@live.com>"; pawelpacana = "Paweł Pacana <pawel.pacana@gmail.com>"; pbogdan = "Piotr Bogdan <ppbogdan@gmail.com>"; + pcarrier = "Pierre Carrier <pc@rrier.ca>"; periklis = "theopompos@gmail.com"; pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>"; peterhoeg = "Peter Hoeg <peter@hoeg.com>"; @@ -491,6 +501,7 @@ Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>"; phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>"; phunehehe = "Hoang Xuan Phu <phunehehe@gmail.com>"; + pierrechevalier83 = "Pierre Chevalier <pierrechevalier83@gmail.com>"; pierrer = "Pierre Radermecker <pierrer@pi3r.be>"; pierron = "Nicolas B. Pierron <nixos@nbp.name>"; piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>"; @@ -633,6 +644,7 @@ theuni = "Christian Theune <ct@flyingcircus.io>"; ThomasMader = "Thomas Mader <thomas.mader@gmail.com>"; thoughtpolice = "Austin Seipp <aseipp@pobox.com>"; + thpham = "Thomas Pham <thomas.pham@ithings.ch>"; timbertson = "Tim Cuthbertson <tim@gfxmonk.net>"; timokau = "Timo Kaufmann <timokau@zoho.com>"; titanous = "Jonathan Rudenberg <jonathan@titanous.com>"; @@ -690,6 +702,7 @@ womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>"; wscott = "Wayne Scott <wsc9tt@gmail.com>"; wyvie = "Elijah Rum <elijahrum@gmail.com>"; + xaverdh = "Dominik Xaver Hörl <hoe.dom@gmx.de>"; xnwdd = "Guillermo NWDD <nwdd+nixos@no.team>"; xvapx = "Marti Serra <marti.serra.coscollano@gmail.com>"; xwvvvvwx = "David Terry <davidterry@posteo.de>"; @@ -699,6 +712,7 @@ ylwghst = "Burim Augustin Berisa <ylwghst@onionmail.info>"; yochai = "Yochai <yochai@titat.info>"; yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>"; + yrashk = "Yurii Rashkovskii <yrashk@gmail.com>"; yuriaisaka = "Yuri Aisaka <yuri.aisaka+nix@gmail.com>"; yurrriq = "Eric Bailey <eric@ericb.me>"; z77z = "Marco Maggesi <maggesi@math.unifi.it>"; diff --git a/lib/sandbox.nix b/lib/sandbox.nix deleted file mode 100644 index 2cdeb40938a..00000000000 --- a/lib/sandbox.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ lib }: -with lib.strings; - -/* Helpers for creating lisp S-exprs for the Apple sandbox - -lib.sandbox.allowFileRead [ "/usr/bin/file" ]; - # => "(allow file-read* (literal \"/usr/bin/file\"))"; - -lib.sandbox.allowFileRead { - literal = [ "/usr/bin/file" ]; - subpath = [ "/usr/lib/system" ]; -} - # => "(allow file-read* (literal \"/usr/bin/file\") (subpath \"/usr/lib/system\"))" -*/ - -let - -sexp = tokens: "(" + builtins.concatStringsSep " " tokens + ")"; -generateFileList = files: - if builtins.isList files - then concatMapStringsSep " " (x: sexp [ "literal" ''"${x}"'' ]) files - else if builtins.isString files - then generateFileList [ files ] - else concatStringsSep " " ( - (map (x: sexp [ "literal" ''"${x}"'' ]) (files.literal or [])) ++ - (map (x: sexp [ "subpath" ''"${x}"'' ]) (files.subpath or [])) - ); -applyToFiles = f: act: files: f "${act} ${generateFileList files}"; -genActions = actionName: let - action = feature: sexp [ actionName feature ]; - self = { - "${actionName}" = action; - "${actionName}File" = applyToFiles action "file*"; - "${actionName}FileRead" = applyToFiles action "file-read*"; - "${actionName}FileReadMetadata" = applyToFiles action "file-read-metadata"; - "${actionName}DirectoryList" = self."${actionName}FileReadMetadata"; - "${actionName}FileWrite" = applyToFiles action "file-write*"; - "${actionName}FileWriteMetadata" = applyToFiles action "file-write-metadata"; - }; - in self; - -in - -genActions "allow" // genActions "deny" // { - importProfile = derivation: '' - (import "${derivation}") - ''; -} diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 4c4c06fe78d..1657ec33a46 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -201,7 +201,7 @@ runTests { # in alphabetical order testMkKeyValueDefault = { - expr = generators.mkKeyValueDefault ":" "f:oo" "bar"; + expr = generators.mkKeyValueDefault {} ":" "f:oo" "bar"; expected = ''f\:oo:bar''; }; |