Merge remote-tracking branch 'upstream/master' into hardened-stdenv
This commit is contained in:
commit
3477e662e6
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,7 +1,7 @@
|
|||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
Note: contributing implies licensing those contributions
|
Note: contributing implies licensing those contributions
|
||||||
under the terms of [COPYING](./COPYING), which is an MIT-like license.
|
under the terms of [COPYING](../COPYING), which is an MIT-like license.
|
||||||
|
|
||||||
## Opening issues
|
## Opening issues
|
||||||
|
|
||||||
|
17
.github/ISSUE_TEMPLATE.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
## Basic info
|
||||||
|
|
||||||
|
To make sure that we are on the same page:
|
||||||
|
|
||||||
|
* Kernel: (run `uname -a`)
|
||||||
|
* System: (NixOS: `nixos-version`, Ubuntu/Fedora: `lsb_release -a`, ...)
|
||||||
|
* Nix version: (run `nix-env --version`)
|
||||||
|
* Nixpkgs version: (run `nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion`)
|
||||||
|
|
||||||
|
## Describe your issue here
|
||||||
|
|
||||||
|
### Expected result
|
||||||
|
|
||||||
|
### Actual result
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
###### Things done:
|
||||||
|
- [ ] Tested via `nix.useChroot`.
|
||||||
|
- [ ] Built on platform(s): .
|
||||||
|
- [ ] Tested compilation of all pkgs that depend on this change.
|
||||||
|
- [ ] Tested execution of binary products.
|
||||||
|
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
###### Extra
|
||||||
|
Fixes # .
|
||||||
|
|
||||||
|
cc @ .
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_Please note, that points are not mandatory._
|
@ -56,8 +56,11 @@ stdenv.mkDerivation {
|
|||||||
inputFile = ./../pkgs/development/idris-modules/README.md;
|
inputFile = ./../pkgs/development/idris-modules/README.md;
|
||||||
outputFile = "languages-frameworks/idris.xml";
|
outputFile = "languages-frameworks/idris.xml";
|
||||||
}
|
}
|
||||||
|
+ toDocbook {
|
||||||
|
inputFile = ./../pkgs/development/r-modules/README.md;
|
||||||
|
outputFile = "languages-frameworks/r.xml";
|
||||||
|
}
|
||||||
+ ''
|
+ ''
|
||||||
cat languages-frameworks/idris.xml
|
|
||||||
echo ${nixpkgsVersion} > .version
|
echo ${nixpkgsVersion} > .version
|
||||||
|
|
||||||
xmllint --noout --nonet --xinclude --noxincludenode \
|
xmllint --noout --nonet --xinclude --noxincludenode \
|
||||||
|
@ -21,6 +21,7 @@ such as Perl or Haskell. These are described in this chapter.</para>
|
|||||||
<xi:include href="lua.xml" />
|
<xi:include href="lua.xml" />
|
||||||
<xi:include href="coq.xml" />
|
<xi:include href="coq.xml" />
|
||||||
<xi:include href="idris.xml" /> <!-- generated from ../../pkgs/development/idris-modules/README.md -->
|
<xi:include href="idris.xml" /> <!-- generated from ../../pkgs/development/idris-modules/README.md -->
|
||||||
|
<xi:include href="r.xml" /> <!-- generated from ../../pkgs/development/r-modules/README.md -->
|
||||||
<xi:include href="qt.xml" />
|
<xi:include href="qt.xml" />
|
||||||
|
|
||||||
|
|
||||||
|
33
doc/meta.xml
33
doc/meta.xml
@ -258,45 +258,54 @@ a value from <varname>stdenv.lib.licenses</varname> defined in
|
|||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
|
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
|
||||||
<filename>nixpkgs/lib/licenses.nix</filename></link>,
|
<filename>nixpkgs/lib/licenses.nix</filename></link>,
|
||||||
or in-place license description of the same format if the license is
|
or in-place license description of the same format if the license is
|
||||||
unlikely to be useful in another expression.
|
unlikely to be useful in another expression.</para>
|
||||||
|
|
||||||
|
<para>Although it's typically better to indicate the specific license,
|
||||||
|
a few generic options are available:
|
||||||
|
|
||||||
A few generic options are available, although it's typically better
|
|
||||||
to indicate the specific license:
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>free</varname></term>
|
<term><varname>stdenv.lib.licenses.free</varname>,
|
||||||
|
<varname>"free"</varname></term>
|
||||||
|
|
||||||
<listitem><para>Catch-all for free software licenses not listed
|
<listitem><para>Catch-all for free software licenses not listed
|
||||||
above.</para></listitem>
|
above.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>unfree-redistributable</varname></term>
|
<term><varname>stdenv.lib.licenses.unfreeRedistributable</varname>,
|
||||||
|
<varname>"unfree-redistributable"</varname></term>
|
||||||
|
|
||||||
<listitem><para>Unfree package that can be redistributed in binary
|
<listitem><para>Unfree package that can be redistributed in binary
|
||||||
form. That is, it’s legal to redistribute the
|
form. That is, it’s legal to redistribute the
|
||||||
<emphasis>output</emphasis> of the derivation. This means that
|
<emphasis>output</emphasis> of the derivation. This means that
|
||||||
the package can be included in the Nixpkgs
|
the package can be included in the Nixpkgs
|
||||||
channel.</para>
|
channel.</para>
|
||||||
|
|
||||||
<para>Sometimes proprietary software can only be redistributed
|
<para>Sometimes proprietary software can only be redistributed
|
||||||
unmodified. Make sure the builder doesn’t actually modify the
|
unmodified. Make sure the builder doesn’t actually modify the
|
||||||
original binaries; otherwise we’re breaking the license. For
|
original binaries; otherwise we’re breaking the license. For
|
||||||
instance, the NVIDIA X11 drivers can be redistributed unmodified,
|
instance, the NVIDIA X11 drivers can be redistributed unmodified,
|
||||||
but our builder applies <command>patchelf</command> to make them
|
but our builder applies <command>patchelf</command> to make them
|
||||||
work. Thus, its license is <varname>unfree</varname> and it
|
work. Thus, its license is <varname>"unfree"</varname> and it
|
||||||
cannot be included in the Nixpkgs channel.</para></listitem>
|
cannot be included in the Nixpkgs channel.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>unfree</varname></term>
|
<term><varname>stdenv.lib.licenses.unfree</varname>,
|
||||||
<listitem><para>Unfree package that cannot be redistributed. You
|
<varname>"unfree"</varname></term>
|
||||||
|
|
||||||
|
<listitem><para>Unfree package that cannot be redistributed. You
|
||||||
can build it yourself, but you cannot redistribute the output of
|
can build it yourself, but you cannot redistribute the output of
|
||||||
the derivation. Thus it cannot be included in the Nixpkgs
|
the derivation. Thus it cannot be included in the Nixpkgs
|
||||||
channel.</para></listitem>
|
channel.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>unfree-redistributable-firmware</varname></term>
|
<term><varname>stdenv.lib.licenses.unfreeRedistributableFirmware</varname>,
|
||||||
|
<varname>"unfree-redistributable-firmware"</varname></term>
|
||||||
|
|
||||||
<listitem><para>This package supplies unfree, redistributable
|
<listitem><para>This package supplies unfree, redistributable
|
||||||
firmware. This is a separate value from
|
firmware. This is a separate value from
|
||||||
<varname>unfree-redistributable</varname> because not everybody
|
<varname>unfree-redistributable</varname> because not everybody
|
||||||
|
@ -155,6 +155,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "Common Public License 1.0";
|
fullName = "Common Public License 1.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
doc = spdx {
|
||||||
|
spdxId = "DOC";
|
||||||
|
fullName = "DOC License";
|
||||||
|
};
|
||||||
|
|
||||||
efl10 = spdx {
|
efl10 = spdx {
|
||||||
spdxId = "EFL-1.0";
|
spdxId = "EFL-1.0";
|
||||||
fullName = "Eiffel Forum License v1.0";
|
fullName = "Eiffel Forum License v1.0";
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
/* -*- coding: utf-8; -*- */
|
/* List of NixOS maintainers. The format is:
|
||||||
|
|
||||||
|
handle = "Real Name <address@example.org>";
|
||||||
|
|
||||||
|
where <handle> is preferred to be your GitHub username (so it's easy
|
||||||
|
to ping a package @<handle>), and <Real Name> is your real name, not
|
||||||
|
a pseudonym. Please keep the list alphabetically sorted. */
|
||||||
{
|
{
|
||||||
/* Add your name and email address here.
|
|
||||||
Keep the list alphabetically sorted.
|
|
||||||
Prefer the same attrname as your github username, please,
|
|
||||||
so it's easy to ping a package @maintainer.
|
|
||||||
*/
|
|
||||||
|
|
||||||
aaronschif = "Aaron Schif <aaronschif@gmail.com>";
|
|
||||||
a1russell = "Adam Russell <adamlr6+pub@gmail.com>";
|
a1russell = "Adam Russell <adamlr6+pub@gmail.com>";
|
||||||
|
aaronschif = "Aaron Schif <aaronschif@gmail.com>";
|
||||||
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
|
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
|
||||||
abbradar = "Nikolay Amiantov <ab@fmap.me>";
|
abbradar = "Nikolay Amiantov <ab@fmap.me>";
|
||||||
adev = "Adrien Devresse <adev@adev.name>";
|
adev = "Adrien Devresse <adev@adev.name>";
|
||||||
aforemny = "Alexander Foremny <alexanderforemny@googlemail.com>";
|
aespinosa = "Allan Espinosa <allan.espinosa@outlook.com>";
|
||||||
aflatter = "Alexander Flatter <flatter@fastmail.fm>";
|
aflatter = "Alexander Flatter <flatter@fastmail.fm>";
|
||||||
|
aforemny = "Alexander Foremny <alexanderforemny@googlemail.com>";
|
||||||
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
||||||
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
||||||
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
|
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
|
||||||
@ -45,8 +45,8 @@
|
|||||||
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
|
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
|
||||||
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
|
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
|
||||||
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
|
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
|
||||||
bennofs = "Benno Fünfstück <benno.fuenfstueck@gmail.com>";
|
|
||||||
benley = "Benjamin Staffin <benley@gmail.com>";
|
benley = "Benjamin Staffin <benley@gmail.com>";
|
||||||
|
bennofs = "Benno Fünfstück <benno.fuenfstueck@gmail.com>";
|
||||||
berdario = "Dario Bertini <berdario@gmail.com>";
|
berdario = "Dario Bertini <berdario@gmail.com>";
|
||||||
bergey = "Daniel Bergey <bergey@teallabs.org>";
|
bergey = "Daniel Bergey <bergey@teallabs.org>";
|
||||||
bjg = "Brian Gough <bjg@gnu.org>";
|
bjg = "Brian Gough <bjg@gnu.org>";
|
||||||
@ -58,6 +58,7 @@
|
|||||||
bosu = "Boris Sukholitko <boriss@gmail.com>";
|
bosu = "Boris Sukholitko <boriss@gmail.com>";
|
||||||
bramd = "Bram Duvigneau <bram@bramd.nl>";
|
bramd = "Bram Duvigneau <bram@bramd.nl>";
|
||||||
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
||||||
|
bzizou = "Bruno Bzeznik <Bruno@bzizou.net>";
|
||||||
c0dehero = "CodeHero <codehero@nerdpol.ch>";
|
c0dehero = "CodeHero <codehero@nerdpol.ch>";
|
||||||
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
|
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
|
||||||
campadrenalin = "Philip Horger <campadrenalin@gmail.com>";
|
campadrenalin = "Philip Horger <campadrenalin@gmail.com>";
|
||||||
@ -80,9 +81,9 @@
|
|||||||
davidak = "David Kleuker <post@davidak.de>";
|
davidak = "David Kleuker <post@davidak.de>";
|
||||||
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
||||||
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
|
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
|
||||||
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
|
|
||||||
deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>";
|
deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>";
|
||||||
demin-dmitriy = "Dmitriy Demin <demindf@gmail.com>";
|
demin-dmitriy = "Dmitriy Demin <demindf@gmail.com>";
|
||||||
|
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
|
||||||
desiderius = "Didier J. Devroye <didier@devroye.name>";
|
desiderius = "Didier J. Devroye <didier@devroye.name>";
|
||||||
devhell = "devhell <\"^\"@regexmail.net>";
|
devhell = "devhell <\"^\"@regexmail.net>";
|
||||||
dezgeg = "Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>";
|
dezgeg = "Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>";
|
||||||
@ -122,6 +123,7 @@
|
|||||||
ftrvxmtrx = "Siarhei Zirukin <ftrvxmtrx@gmail.com>";
|
ftrvxmtrx = "Siarhei Zirukin <ftrvxmtrx@gmail.com>";
|
||||||
funfunctor = "Edward O'Callaghan <eocallaghan@alterapraxis.com>";
|
funfunctor = "Edward O'Callaghan <eocallaghan@alterapraxis.com>";
|
||||||
fuuzetsu = "Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
|
fuuzetsu = "Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
|
||||||
|
fxfactorial = "Edgar Aroutiounian <edgar.factorial@gmail.com>";
|
||||||
gal_bolle = "Florent Becker <florent.becker@ens-lyon.org>";
|
gal_bolle = "Florent Becker <florent.becker@ens-lyon.org>";
|
||||||
garbas = "Rok Garbas <rok@garbas.si>";
|
garbas = "Rok Garbas <rok@garbas.si>";
|
||||||
garrison = "Jim Garrison <jim@garrison.cc>";
|
garrison = "Jim Garrison <jim@garrison.cc>";
|
||||||
@ -132,6 +134,7 @@
|
|||||||
gleber = "Gleb Peregud <gleber.p@gmail.com>";
|
gleber = "Gleb Peregud <gleber.p@gmail.com>";
|
||||||
globin = "Robin Gloster <mail@glob.in>";
|
globin = "Robin Gloster <mail@glob.in>";
|
||||||
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
|
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
|
||||||
|
Gonzih = "Max Gonzih <gonzih@gmail.com>";
|
||||||
gridaphobe = "Eric Seidel <eric@seidel.io>";
|
gridaphobe = "Eric Seidel <eric@seidel.io>";
|
||||||
guibert = "David Guibert <david.guibert@gmail.com>";
|
guibert = "David Guibert <david.guibert@gmail.com>";
|
||||||
havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
|
havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
|
||||||
@ -188,9 +191,9 @@
|
|||||||
lowfatcomputing = "Andreas Wagner <andreas.wagner@lowfatcomputing.org>";
|
lowfatcomputing = "Andreas Wagner <andreas.wagner@lowfatcomputing.org>";
|
||||||
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
|
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
|
||||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||||
|
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
||||||
lukasepple = "Lukas Epple <post@lukasepple.de>";
|
lukasepple = "Lukas Epple <post@lukasepple.de>";
|
||||||
lukego = "Luke Gorrie <luke@snabb.co>";
|
lukego = "Luke Gorrie <luke@snabb.co>";
|
||||||
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
|
||||||
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
||||||
madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
|
madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
|
||||||
magnetophon = "Bart Brouns <bart@magnetophon.nl>";
|
magnetophon = "Bart Brouns <bart@magnetophon.nl>";
|
||||||
@ -200,25 +203,25 @@
|
|||||||
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
|
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
|
||||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||||
markWot = "Markus Wotringer <markus@wotringer.de>";
|
markWot = "Markus Wotringer <markus@wotringer.de>";
|
||||||
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
|
|
||||||
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||||
mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>";
|
mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>";
|
||||||
matthiasbeyer = "Matthias Beyer <mail@beyermatthias.de>";
|
matthiasbeyer = "Matthias Beyer <mail@beyermatthias.de>";
|
||||||
|
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
|
||||||
mbakke = "Marius Bakke <ymse@tuta.io>";
|
mbakke = "Marius Bakke <ymse@tuta.io>";
|
||||||
mbe = "Brandon Edens <brandonedens@gmail.com>";
|
mbe = "Brandon Edens <brandonedens@gmail.com>";
|
||||||
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
|
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
|
||||||
meditans = "Carlo Nucera <meditans@gmail.com>";
|
meditans = "Carlo Nucera <meditans@gmail.com>";
|
||||||
meisternu = "Matt Miemiec <meister@krutt.org>";
|
meisternu = "Matt Miemiec <meister@krutt.org>";
|
||||||
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
|
||||||
michaelpj = "Michael Peyton Jones <michaelpj@gmail.com>";
|
michaelpj = "Michael Peyton Jones <michaelpj@gmail.com>";
|
||||||
|
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
||||||
mingchuan = "Ming Chuan <ming@culpring.com>";
|
mingchuan = "Ming Chuan <ming@culpring.com>";
|
||||||
mirdhyn = "Merlin Gaillard <mirdhyn@gmail.com>";
|
mirdhyn = "Merlin Gaillard <mirdhyn@gmail.com>";
|
||||||
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
|
|
||||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||||
mog = "Matthew O'Gorman <mog-lists@rldn.net>";
|
mog = "Matthew O'Gorman <mog-lists@rldn.net>";
|
||||||
mornfall = "Petr Ročkai <me@mornfall.net>";
|
mornfall = "Petr Ročkai <me@mornfall.net>";
|
||||||
MP2E = "Cray Elliott <MP2E@archlinux.us>";
|
MP2E = "Cray Elliott <MP2E@archlinux.us>";
|
||||||
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
||||||
|
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
|
||||||
msteen = "Matthijs Steen <emailmatthijs@gmail.com>";
|
msteen = "Matthijs Steen <emailmatthijs@gmail.com>";
|
||||||
mtreskin = "Max Treskin <zerthurd@gmail.com>";
|
mtreskin = "Max Treskin <zerthurd@gmail.com>";
|
||||||
mudri = "James Wood <lamudri@gmail.com>";
|
mudri = "James Wood <lamudri@gmail.com>";
|
||||||
@ -245,8 +248,9 @@
|
|||||||
palo = "Ingolf Wanger <palipalo9@googlemail.com>";
|
palo = "Ingolf Wanger <palipalo9@googlemail.com>";
|
||||||
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
||||||
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
||||||
phile314 = "Philipp Hausmann <nix@314.ch>";
|
|
||||||
philandstuff = "Philip Potter <philip.g.potter@gmail.com>";
|
philandstuff = "Philip Potter <philip.g.potter@gmail.com>";
|
||||||
|
phile314 = "Philipp Hausmann <nix@314.ch>";
|
||||||
|
Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>";
|
||||||
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
||||||
phunehehe = "Hoang Xuan Phu <phunehehe@gmail.com>";
|
phunehehe = "Hoang Xuan Phu <phunehehe@gmail.com>";
|
||||||
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
||||||
@ -255,7 +259,6 @@
|
|||||||
pjones = "Peter Jones <pjones@devalot.com>";
|
pjones = "Peter Jones <pjones@devalot.com>";
|
||||||
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
|
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
|
||||||
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
||||||
Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>";
|
|
||||||
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
||||||
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
|
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
|
||||||
prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
|
prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
|
||||||
@ -347,9 +350,9 @@
|
|||||||
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
|
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
|
||||||
wizeman = "Ricardo M. Correia <rcorreia@wizy.org>";
|
wizeman = "Ricardo M. Correia <rcorreia@wizy.org>";
|
||||||
wjlroe = "William Roe <willroe@gmail.com>";
|
wjlroe = "William Roe <willroe@gmail.com>";
|
||||||
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
|
|
||||||
wkennington = "William A. Kennington III <william@wkennington.com>";
|
wkennington = "William A. Kennington III <william@wkennington.com>";
|
||||||
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
|
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
|
||||||
|
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
|
||||||
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
||||||
wyvie = "Elijah Rum <elijahrum@gmail.com>";
|
wyvie = "Elijah Rum <elijahrum@gmail.com>";
|
||||||
yarr = "Dmitry V. <savraz@gmail.com>";
|
yarr = "Dmitry V. <savraz@gmail.com>";
|
||||||
@ -359,5 +362,4 @@
|
|||||||
zimbatm = "zimbatm <zimbatm@zimbatm.com>";
|
zimbatm = "zimbatm <zimbatm@zimbatm.com>";
|
||||||
zohl = "Al Zohali <zohl@fmap.me>";
|
zohl = "Al Zohali <zohl@fmap.me>";
|
||||||
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
|
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
|
||||||
Gonzih = "Max Gonzih <gonzih@gmail.com>";
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
let lists = import ./lists.nix; in
|
let lists = import ./lists.nix; in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
|
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
||||||
linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "mips64el-linux"];
|
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
|
||||||
|
none = [];
|
||||||
|
|
||||||
|
arm = ["armv5tel-linux" "armv6l-linux" "armv7l-linux" ];
|
||||||
|
i686 = ["i686-linux" "i686-freebsd" "i686-netbsd" "i686-cygwin"];
|
||||||
|
mips = [ "mips64el-linux" ];
|
||||||
|
x86_64 = ["x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin"];
|
||||||
|
|
||||||
|
cygwin = ["i686-cygwin" "x86_64-cygwin"];
|
||||||
darwin = ["x86_64-darwin"];
|
darwin = ["x86_64-darwin"];
|
||||||
freebsd = ["i686-freebsd" "x86_64-freebsd"];
|
freebsd = ["i686-freebsd" "x86_64-freebsd"];
|
||||||
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
|
||||||
netbsd = ["i686-netbsd" "x86_64-netbsd"];
|
|
||||||
cygwin = ["i686-cygwin" "x86_64-cygwin"];
|
|
||||||
illumos = ["x86_64-solaris"];
|
illumos = ["x86_64-solaris"];
|
||||||
|
linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "mips64el-linux"];
|
||||||
|
netbsd = ["i686-netbsd" "x86_64-netbsd"];
|
||||||
|
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
||||||
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
||||||
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
|
||||||
none = [];
|
|
||||||
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
|
|
||||||
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux"];
|
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux"];
|
||||||
x86_64 = ["x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin"];
|
|
||||||
i686 = ["i686-linux" "i686-freebsd" "i686-netbsd" "i686-cygwin"];
|
|
||||||
arm = ["armv5tel-linux" "armv6l-linux" "armv7l-linux" ];
|
|
||||||
mips = [ "mips64el-linux" ];
|
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,10 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
isDarwin = matchAttrs { kernel = kernels.darwin; };
|
|
||||||
isLinux = matchAttrs { kernel = kernels.linux; };
|
|
||||||
isi686 = matchAttrs { cpu = cpuTypes.i686; };
|
|
||||||
is64Bit = matchAttrs { cpu = { bits = 64; }; };
|
is64Bit = matchAttrs { cpu = { bits = 64; }; };
|
||||||
|
isDarwin = matchAttrs { kernel = kernels.darwin; };
|
||||||
|
isi686 = matchAttrs { cpu = cpuTypes.i686; };
|
||||||
|
isLinux = matchAttrs { kernel = kernels.linux; };
|
||||||
|
|
||||||
|
|
||||||
# This should revert the job done by config.guess from the gcc compiler.
|
# This should revert the job done by config.guess from the gcc compiler.
|
||||||
|
@ -11,14 +11,14 @@ stdenv.mkDerivation {
|
|||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
datadir="${nix}/share"
|
datadir="${nix}/share"
|
||||||
export TEST_ROOT=$(pwd)/test-tmp
|
export TEST_ROOT=$(pwd)/test-tmp
|
||||||
export NIX_STORE_DIR=$TEST_ROOT/store
|
export NIX_BUILD_HOOK=
|
||||||
|
export NIX_CONF_DIR=$TEST_ROOT/etc
|
||||||
|
export NIX_DB_DIR=$TEST_ROOT/db
|
||||||
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
|
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
|
||||||
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
|
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
|
||||||
export NIX_STATE_DIR=$TEST_ROOT/var/nix
|
|
||||||
export NIX_DB_DIR=$TEST_ROOT/db
|
|
||||||
export NIX_CONF_DIR=$TEST_ROOT/etc
|
|
||||||
export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
|
export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
|
||||||
export NIX_BUILD_HOOK=
|
export NIX_STATE_DIR=$TEST_ROOT/var/nix
|
||||||
|
export NIX_STORE_DIR=$TEST_ROOT/store
|
||||||
export PAGER=cat
|
export PAGER=cat
|
||||||
cacheDir=$TEST_ROOT/binary-cache
|
cacheDir=$TEST_ROOT/binary-cache
|
||||||
nix-store --init
|
nix-store --init
|
||||||
|
@ -18,7 +18,8 @@ let
|
|||||||
|
|
||||||
fetchurlDependencies =
|
fetchurlDependencies =
|
||||||
filter
|
filter
|
||||||
(drv: drv.outputHash or "" != "" && drv.outputHashMode == "flat" && drv.postFetch or "" == "" && drv ? urls)
|
(drv: drv.outputHash or "" != "" && drv.outputHashMode or "flat" == "flat"
|
||||||
|
&& drv.postFetch or "" == "" && drv ? urls)
|
||||||
dependencies;
|
dependencies;
|
||||||
|
|
||||||
dependencies = map (x: x.value) (genericClosure {
|
dependencies = map (x: x.value) (genericClosure {
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
{ stdenv, makeWrapper, perl, perlPackages }:
|
{ stdenv, makeWrapper, perl, perlPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "nix-generate-from-cpan-1";
|
name = "nix-generate-from-cpan-2";
|
||||||
|
|
||||||
buildInputs = [ makeWrapper perl perlPackages.YAMLLibYAML perlPackages.JSON perlPackages.CPANPLUS ];
|
buildInputs = with perlPackages; [
|
||||||
|
makeWrapper perl CPANMeta GetoptLongDescriptive CPANPLUS Readonly Log4Perl
|
||||||
|
];
|
||||||
|
|
||||||
unpackPhase = "true";
|
phases = [ "installPhase" ];
|
||||||
buildPhase = "true";
|
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
|
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
|
||||||
|
patchShebangs $out/bin/nix-generate-from-cpan
|
||||||
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
|
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = with stdenv.lib.maintainers; [ eelco rycee ];
|
||||||
description = "Utility to generate a Nix expression for a Perl package from CPAN";
|
description = "Utility to generate a Nix expression for a Perl package from CPAN";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,154 +1,440 @@
|
|||||||
#! /run/current-system/sw/bin/perl -w
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use CPANPLUS::Backend;
|
use warnings;
|
||||||
use YAML::XS;
|
|
||||||
use JSON;
|
|
||||||
|
|
||||||
my $module_name = $ARGV[0];
|
use CPAN::Meta();
|
||||||
die "syntax: $0 <MODULE-NAME>\n" unless defined $module_name;
|
use CPANPLUS::Backend();
|
||||||
|
use Getopt::Long::Descriptive qw( describe_options );
|
||||||
|
use JSON::PP qw( encode_json );
|
||||||
|
use Log::Log4perl qw(:easy);
|
||||||
|
use Readonly();
|
||||||
|
|
||||||
my $cb = CPANPLUS::Backend->new;
|
# Readonly hash that maps CPAN style license strings to information
|
||||||
|
# necessary to generate a Nixpkgs style license attribute.
|
||||||
|
Readonly::Hash my %LICENSE_MAP => (
|
||||||
|
|
||||||
my @modules = $cb->search(type => "name", allow => [$module_name]);
|
# The Perl 5 License (Artistic 1 & GPL 1 or later).
|
||||||
die "module $module_name not found\n" if scalar @modules == 0;
|
perl_5 => {
|
||||||
die "multiple packages that match module $module_name\n" if scalar @modules > 1;
|
licenses => [qw( artistic1 gpl1Plus )]
|
||||||
my $module = $modules[0];
|
},
|
||||||
|
|
||||||
|
# GNU Affero General Public License, Version 3.
|
||||||
|
agpl_3 => {
|
||||||
|
licenses => [qw( agpl3Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# Apache Software License, Version 1.1.
|
||||||
|
apache_1_1 => {
|
||||||
|
licenses => ["Apache License 1.1"],
|
||||||
|
in_set => 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# Apache License, Version 2.0.
|
||||||
|
apache_2_0 => {
|
||||||
|
licenses => [qw( asl20 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Artistic License, (Version 1).
|
||||||
|
artistic_1 => {
|
||||||
|
licenses => [qw( artistic1 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Artistic License, Version 2.0.
|
||||||
|
artistic_2 => {
|
||||||
|
licenses => [qw( artistic2 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# BSD License (three-clause).
|
||||||
|
bsd => {
|
||||||
|
licenses => [qw( bsd3 )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# FreeBSD License (two-clause).
|
||||||
|
freebsd => {
|
||||||
|
licenses => [qw( bsd2 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU Free Documentation License, Version 1.2.
|
||||||
|
gfdl_1_2 => {
|
||||||
|
licenses => [qw( fdl12 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU Free Documentation License, Version 1.3.
|
||||||
|
gfdl_1_3 => {
|
||||||
|
licenses => [qw( fdl13 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU General Public License, Version 1.
|
||||||
|
gpl_1 => {
|
||||||
|
licenses => [qw( gpl1Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU General Public License, Version 2. Note, we will interpret
|
||||||
|
# "gpl" alone as GPL v2+.
|
||||||
|
gpl_2 => {
|
||||||
|
licenses => [qw( gpl2Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU General Public License, Version 3.
|
||||||
|
gpl_3 => {
|
||||||
|
licenses => [qw( gpl3Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU Lesser General Public License, Version 2.1. Note, we will
|
||||||
|
# interpret "gpl" alone as LGPL v2.1+.
|
||||||
|
lgpl_2_1 => {
|
||||||
|
licenses => [qw( lgpl21Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# GNU Lesser General Public License, Version 3.0.
|
||||||
|
lgpl_3_0 => {
|
||||||
|
licenses => [qw( lgpl3Plus )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# MIT (aka X11) License.
|
||||||
|
mit => {
|
||||||
|
licenses => [qw( mit )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Mozilla Public License, Version 1.0.
|
||||||
|
mozilla_1_0 => {
|
||||||
|
licenses => [qw( mpl10 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Mozilla Public License, Version 1.1.
|
||||||
|
mozilla_1_1 => {
|
||||||
|
licenses => [qw( mpl11 )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# OpenSSL License.
|
||||||
|
openssl => {
|
||||||
|
licenses => [qw( openssl )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Q Public License, Version 1.0.
|
||||||
|
qpl_1_0 => {
|
||||||
|
licenses => [qw( qpl )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Original SSLeay License.
|
||||||
|
ssleay => {
|
||||||
|
licenses => ["Original SSLeay License"],
|
||||||
|
in_set => 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# Sun Internet Standards Source License (SISSL).
|
||||||
|
sun => {
|
||||||
|
licenses => ["Sun Industry Standards Source License v1.1"],
|
||||||
|
in_set => 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# zlib License.
|
||||||
|
zlib => {
|
||||||
|
licenses => [qw( zlib )]
|
||||||
|
},
|
||||||
|
|
||||||
|
# Other Open Source Initiative (OSI) approved license.
|
||||||
|
open_source => {
|
||||||
|
licenses => [qw( free )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# Requires special permission from copyright holder.
|
||||||
|
restricted => {
|
||||||
|
licenses => [qw( unfree )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# Not an OSI approved license, but not restricted. Note, we
|
||||||
|
# currently map this to unfreeRedistributable, which is a
|
||||||
|
# conservative choice.
|
||||||
|
unrestricted => {
|
||||||
|
licenses => [qw( unfreeRedistributable )],
|
||||||
|
amb => 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# License not provided in metadata.
|
||||||
|
unknown => {
|
||||||
|
licenses => [qw( unknown )],
|
||||||
|
amb => 1
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
sub handle_opts {
|
||||||
|
my ( $opt, $usage ) = describe_options(
|
||||||
|
'usage: $0 %o MODULE',
|
||||||
|
[ 'maintainer|m=s', 'the package maintainer' ],
|
||||||
|
[ 'debug|d', 'enable debug output' ],
|
||||||
|
[ 'help', 'print usage message and exit' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( $opt->help ) {
|
||||||
|
print $usage->text;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $module_name = $ARGV[0];
|
||||||
|
|
||||||
|
if ( !defined $module_name ) {
|
||||||
|
print STDERR "Missing module name\n";
|
||||||
|
print STDERR $usage->text;
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( $opt, $module_name );
|
||||||
|
}
|
||||||
|
|
||||||
|
# Takes a Perl package attribute name and returns 1 if the name cannot
|
||||||
|
# be referred to as a bareword. This typically happens if the package
|
||||||
|
# name is a reserved Nix keyword.
|
||||||
|
sub is_reserved {
|
||||||
|
my ($pkg) = @_;
|
||||||
|
|
||||||
|
return $pkg =~ /^(?: assert |
|
||||||
|
else |
|
||||||
|
if |
|
||||||
|
import |
|
||||||
|
in |
|
||||||
|
inherit |
|
||||||
|
let |
|
||||||
|
rec |
|
||||||
|
then |
|
||||||
|
while |
|
||||||
|
with )$/x;
|
||||||
|
}
|
||||||
|
|
||||||
sub pkg_to_attr {
|
sub pkg_to_attr {
|
||||||
my ($pkg_name) = @_;
|
my ($module) = @_;
|
||||||
my $attr_name = $pkg_name;
|
my $attr_name = $module->package_name;
|
||||||
$attr_name =~ s/-\d.*//; # strip version
|
if ( $attr_name eq "libwww-perl" ) {
|
||||||
return "LWP" if $attr_name eq "libwww-perl";
|
return "LWP";
|
||||||
$attr_name =~ s/-//g;
|
}
|
||||||
return $attr_name;
|
else {
|
||||||
|
$attr_name =~ s/-//g;
|
||||||
|
return $attr_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_pkg_name {
|
sub get_pkg_name {
|
||||||
my ($module) = @_;
|
my ($module) = @_;
|
||||||
my $pkg_name = $module->package;
|
return $module->package_name . '-' . $module->package_version;
|
||||||
$pkg_name =~ s/\.tar.*//;
|
|
||||||
$pkg_name =~ s/\.zip//;
|
|
||||||
return $pkg_name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my $pkg_name = get_pkg_name $module;
|
sub read_meta {
|
||||||
my $attr_name = pkg_to_attr $pkg_name;
|
my ($pkg_path) = @_;
|
||||||
|
|
||||||
print STDERR "attribute name: ", $attr_name, "\n";
|
my $yaml_path = "$pkg_path/META.yml";
|
||||||
print STDERR "module: ", $module->module, "\n";
|
my $json_path = "$pkg_path/META.json";
|
||||||
print STDERR "version: ", $module->version, "\n";
|
my $meta;
|
||||||
print STDERR "package: ", $module->package, , " (", $pkg_name, ", ", $attr_name, ")\n";
|
|
||||||
print STDERR "path: ", $module->path, "\n";
|
|
||||||
|
|
||||||
my $tar_path = $module->fetch();
|
if ( -r $json_path ) {
|
||||||
print STDERR "downloaded to: $tar_path\n";
|
$meta = CPAN::Meta->load_file($json_path);
|
||||||
print STDERR "sha-256: ", $module->status->checksum_value, "\n";
|
}
|
||||||
|
elsif ( -r $yaml_path ) {
|
||||||
my $pkg_path = $module->extract();
|
$meta = CPAN::Meta->load_file($yaml_path);
|
||||||
print STDERR "unpacked to: $pkg_path\n";
|
}
|
||||||
|
else {
|
||||||
my $meta;
|
WARN("package has no META.yml or META.json");
|
||||||
if (-e "$pkg_path/META.yml") {
|
|
||||||
eval {
|
|
||||||
$meta = YAML::XS::LoadFile("$pkg_path/META.yml");
|
|
||||||
};
|
|
||||||
if ($@) {
|
|
||||||
system("iconv -f windows-1252 -t utf-8 '$pkg_path/META.yml' > '$pkg_path/META.yml.tmp'");
|
|
||||||
$meta = YAML::XS::LoadFile("$pkg_path/META.yml.tmp");
|
|
||||||
}
|
}
|
||||||
} elsif (-e "$pkg_path/META.json") {
|
|
||||||
local $/;
|
|
||||||
open(my $fh, '<', "$pkg_path/META.json") or die;
|
|
||||||
$meta = decode_json(<$fh>);
|
|
||||||
} else {
|
|
||||||
warn "package has no META.yml or META.json\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
print STDERR "metadata: ", encode_json($meta), "\n" if defined $meta;
|
return $meta;
|
||||||
|
}
|
||||||
|
|
||||||
# Map a module to the attribute corresponding to its package
|
# Map a module to the attribute corresponding to its package
|
||||||
# (e.g. HTML::HeadParser will be mapped to HTMLParser, because that
|
# (e.g. HTML::HeadParser will be mapped to HTMLParser, because that
|
||||||
# module is in the HTML-Parser package).
|
# module is in the HTML-Parser package).
|
||||||
sub module_to_pkg {
|
sub module_to_pkg {
|
||||||
my ($module_name) = @_;
|
my ( $cb, $module_name ) = @_;
|
||||||
my @modules = $cb->search(type => "name", allow => [$module_name]);
|
my @modules = $cb->search( type => "name", allow => [$module_name] );
|
||||||
if (scalar @modules == 0) {
|
if ( scalar @modules == 0 ) {
|
||||||
|
|
||||||
# Fallback.
|
# Fallback.
|
||||||
$module_name =~ s/:://g;
|
$module_name =~ s/:://g;
|
||||||
return $module_name;
|
return $module_name;
|
||||||
}
|
}
|
||||||
my $module = $modules[0];
|
my $module = $modules[0];
|
||||||
my $attr_name = pkg_to_attr(get_pkg_name $module);
|
my $attr_name = pkg_to_attr($module);
|
||||||
print STDERR "mapped dep $module_name to $attr_name\n";
|
DEBUG("mapped dep $module_name to $attr_name");
|
||||||
return $attr_name;
|
return $attr_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_deps {
|
sub get_deps {
|
||||||
my ($type) = @_;
|
my ( $cb, $meta, $type ) = @_;
|
||||||
my $deps;
|
|
||||||
if (defined $meta->{prereqs}) {
|
return if !defined $meta;
|
||||||
die "unimplemented";
|
|
||||||
} elsif ($type eq "runtime") {
|
my $prereqs = $meta->effective_prereqs;
|
||||||
$deps = $meta->{requires};
|
my $deps = $prereqs->requirements_for( $type, "requires" );
|
||||||
} elsif ($type eq "configure") {
|
|
||||||
$deps = $meta->{configure_requires};
|
|
||||||
} elsif ($type eq "build") {
|
|
||||||
$deps = $meta->{build_requires};
|
|
||||||
}
|
|
||||||
my @res;
|
my @res;
|
||||||
foreach my $n (keys %{$deps}) {
|
foreach my $n ( $deps->required_modules ) {
|
||||||
next if $n eq "perl";
|
next if $n eq "perl";
|
||||||
|
|
||||||
# Hacky way to figure out if this module is part of Perl.
|
# Hacky way to figure out if this module is part of Perl.
|
||||||
if ($n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/) {
|
if ( $n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/ ) {
|
||||||
eval "use $n;";
|
eval "use $n;";
|
||||||
if (!$@) {
|
if ( !$@ ) {
|
||||||
print STDERR "skipping Perl-builtin module $n\n";
|
DEBUG("skipping Perl-builtin module $n");
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
push @res, module_to_pkg($n);
|
|
||||||
|
my $pkg = module_to_pkg( $cb, $n );
|
||||||
|
|
||||||
|
# If the package name is reserved then we need to refer to it
|
||||||
|
# through the "self" variable.
|
||||||
|
$pkg = "self.\"$pkg\"" if is_reserved($pkg);
|
||||||
|
|
||||||
|
push @res, $pkg;
|
||||||
}
|
}
|
||||||
return @res;
|
return @res;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub uniq {
|
sub uniq {
|
||||||
return keys %{{ map { $_ => 1 } @_ }};
|
return keys %{ { map { $_ => 1 } @_ } };
|
||||||
}
|
}
|
||||||
|
|
||||||
my @build_deps = sort(uniq(get_deps("configure"), get_deps("build"), get_deps("test")));
|
sub render_license {
|
||||||
print STDERR "build deps: @build_deps\n";
|
my ($cpan_license) = @_;
|
||||||
|
|
||||||
my @runtime_deps = sort(uniq(get_deps("runtime")));
|
return if !defined $cpan_license;
|
||||||
print STDERR "runtime deps: @runtime_deps\n";
|
|
||||||
|
|
||||||
my $homepage = $meta->{resources}->{homepage};
|
my $licenses;
|
||||||
print STDERR "homepage: $homepage\n" if defined $homepage;
|
|
||||||
|
|
||||||
my $description = $meta->{abstract};
|
# If the license is ambiguous then we'll print an extra warning.
|
||||||
if (defined $description) {
|
# For example, "gpl_2" is ambiguous since it may refer to exactly
|
||||||
$description = uc(substr($description, 0, 1)) . substr($description, 1); # capitalise first letter
|
# "GPL v2" or to "GPL v2 or later".
|
||||||
$description =~ s/\.$//; # remove period at the end
|
my $amb = 0;
|
||||||
|
|
||||||
|
# Whether the license is available inside `stdenv.lib.licenses`.
|
||||||
|
my $in_set = 1;
|
||||||
|
|
||||||
|
my $nix_license = $LICENSE_MAP{$cpan_license};
|
||||||
|
if ( !$nix_license ) {
|
||||||
|
WARN("Unknown license: $cpan_license");
|
||||||
|
$licenses = [$cpan_license];
|
||||||
|
$in_set = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$licenses = $nix_license->{licenses};
|
||||||
|
$amb = $nix_license->{amb};
|
||||||
|
$in_set = !$nix_license->{in_set};
|
||||||
|
}
|
||||||
|
|
||||||
|
my $license_line;
|
||||||
|
|
||||||
|
if ( @$licenses == 0 ) {
|
||||||
|
|
||||||
|
# Avoid defining the license line.
|
||||||
|
}
|
||||||
|
elsif ($in_set) {
|
||||||
|
my $lic = 'stdenv.lib.licenses';
|
||||||
|
if ( @$licenses == 1 ) {
|
||||||
|
$license_line = "$lic.$licenses->[0]";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$license_line = "with $lic; [ " . join( ' ', @$licenses ) . " ]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ( @$licenses == 1 ) {
|
||||||
|
$license_line = $licenses->[0];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$license_line = '[ ' . join( ' ', @$licenses ) . ' ]';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
INFO("license: $cpan_license");
|
||||||
|
WARN("License '$cpan_license' is ambiguous, please verify") if $amb;
|
||||||
|
|
||||||
|
return $license_line;
|
||||||
|
}
|
||||||
|
|
||||||
|
my ( $opt, $module_name ) = handle_opts();
|
||||||
|
|
||||||
|
Log::Log4perl->easy_init(
|
||||||
|
{
|
||||||
|
level => $opt->debug ? $DEBUG : $INFO,
|
||||||
|
layout => '%m%n'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
my $cb = CPANPLUS::Backend->new;
|
||||||
|
|
||||||
|
my @modules = $cb->search( type => "name", allow => [$module_name] );
|
||||||
|
die "module $module_name not found\n" if scalar @modules == 0;
|
||||||
|
die "multiple packages that match module $module_name\n" if scalar @modules > 1;
|
||||||
|
my $module = $modules[0];
|
||||||
|
|
||||||
|
my $pkg_name = get_pkg_name $module;
|
||||||
|
my $attr_name = pkg_to_attr $module;
|
||||||
|
|
||||||
|
INFO( "attribute name: ", $attr_name );
|
||||||
|
INFO( "module: ", $module->module );
|
||||||
|
INFO( "version: ", $module->version );
|
||||||
|
INFO( "package: ", $module->package, " (", $pkg_name, ", ", $attr_name, ")" );
|
||||||
|
INFO( "path: ", $module->path );
|
||||||
|
|
||||||
|
my $tar_path = $module->fetch();
|
||||||
|
INFO( "downloaded to: ", $tar_path );
|
||||||
|
INFO( "sha-256: ", $module->status->checksum_value );
|
||||||
|
|
||||||
|
my $pkg_path = $module->extract();
|
||||||
|
INFO( "unpacked to: ", $pkg_path );
|
||||||
|
|
||||||
|
my $meta = read_meta($pkg_path);
|
||||||
|
|
||||||
|
DEBUG( "metadata: ", encode_json( $meta->as_struct ) ) if defined $meta;
|
||||||
|
|
||||||
|
my @build_deps = sort( uniq(
|
||||||
|
get_deps( $cb, $meta, "configure" ),
|
||||||
|
get_deps( $cb, $meta, "build" ),
|
||||||
|
get_deps( $cb, $meta, "test" )
|
||||||
|
) );
|
||||||
|
INFO("build deps: @build_deps");
|
||||||
|
|
||||||
|
my @runtime_deps = sort( uniq( get_deps( $cb, $meta, "runtime" ) ) );
|
||||||
|
INFO("runtime deps: @runtime_deps");
|
||||||
|
|
||||||
|
my $homepage = $meta ? $meta->resources->{homepage} : undef;
|
||||||
|
INFO("homepage: $homepage") if defined $homepage;
|
||||||
|
|
||||||
|
my $description = $meta ? $meta->abstract : undef;
|
||||||
|
if ( defined $description ) {
|
||||||
|
$description = uc( substr( $description, 0, 1 ) )
|
||||||
|
. substr( $description, 1 ); # capitalise first letter
|
||||||
|
$description =~ s/\.$//; # remove period at the end
|
||||||
$description =~ s/\s*$//;
|
$description =~ s/\s*$//;
|
||||||
$description =~ s/^\s*//;
|
$description =~ s/^\s*//;
|
||||||
print STDERR "description: $description\n";
|
$description =~ s/\n+/ /; # Replace new lines by space.
|
||||||
|
INFO("description: $description");
|
||||||
}
|
}
|
||||||
|
|
||||||
my $license = $meta->{license};
|
#print(Data::Dumper::Dumper($meta->licenses) . "\n");
|
||||||
if (defined $license) {
|
my $license = $meta ? render_license( $meta->licenses ) : undef;
|
||||||
$license = "perl5" if $license eq "perl_5";
|
|
||||||
print STDERR "license: $license\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $build_fun = -e "$pkg_path/Build.PL" && ! -e "$pkg_path/Makefile.PL" ? "buildPerlModule" : "buildPerlPackage";
|
INFO( "RSS feed: https://metacpan.org/feed/distribution/",
|
||||||
|
$module->package_name );
|
||||||
|
|
||||||
|
my $build_fun = -e "$pkg_path/Build.PL"
|
||||||
|
&& !-e "$pkg_path/Makefile.PL" ? "buildPerlModule" : "buildPerlPackage";
|
||||||
|
|
||||||
print STDERR "===\n";
|
print STDERR "===\n";
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
$attr_name = $build_fun {
|
"$attr_name" = $build_fun rec {
|
||||||
name = "$pkg_name";
|
name = "$pkg_name";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://cpan/${\$module->path}/${\$module->package};
|
url = "mirror://cpan/${\$module->path}/\${name}.${\$module->package_extension}";
|
||||||
sha256 = "${\$module->status->checksum_value}";
|
sha256 = "${\$module->status->checksum_value}";
|
||||||
};
|
};
|
||||||
EOF
|
EOF
|
||||||
@ -168,7 +454,10 @@ print <<EOF if defined $description;
|
|||||||
description = "$description";
|
description = "$description";
|
||||||
EOF
|
EOF
|
||||||
print <<EOF if defined $license;
|
print <<EOF if defined $license;
|
||||||
license = "$license";
|
license = $license;
|
||||||
|
EOF
|
||||||
|
print <<EOF if $opt->maintainer;
|
||||||
|
maintainers = [ maintainers.${\$opt->maintainer} ];
|
||||||
EOF
|
EOF
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,9 @@ elif [[ $1 == nox ]]; then
|
|||||||
elif [[ $1 == build ]]; then
|
elif [[ $1 == build ]]; then
|
||||||
source $HOME/.nix-profile/etc/profile.d/nix.sh
|
source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
|
||||||
|
echo "=== Checking tarball creation"
|
||||||
|
nix-build pkgs/top-level/release.nix -A tarball
|
||||||
|
|
||||||
if [[ $TRAVIS_PULL_REQUEST == false ]]; then
|
if [[ $TRAVIS_PULL_REQUEST == false ]]; then
|
||||||
echo "=== Not a pull request"
|
echo "=== Not a pull request"
|
||||||
else
|
else
|
||||||
@ -41,8 +44,6 @@ elif [[ $1 == build ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# echo "=== Checking tarball creation"
|
|
||||||
# nix-build pkgs/top-level/release.nix -A tarball
|
|
||||||
else
|
else
|
||||||
echo "$0: Unknown option $1" >&2
|
echo "$0: Unknown option $1" >&2
|
||||||
false
|
false
|
||||||
|
@ -28,7 +28,7 @@ fetchGithubName () {
|
|||||||
)"
|
)"
|
||||||
userid="$(
|
userid="$(
|
||||||
curl https://github.com/NixOS/nixpkgs/commit/"$commitid" 2>/dev/null |
|
curl https://github.com/NixOS/nixpkgs/commit/"$commitid" 2>/dev/null |
|
||||||
grep authored -B10 | grep 'href="/' |
|
grep committed -B10 | grep 'href="/' |
|
||||||
sed -re 's@.* href="/@@; s@".*@@' |
|
sed -re 's@.* href="/@@; s@".*@@' |
|
||||||
grep -v "/commit/"
|
grep -v "/commit/"
|
||||||
)";
|
)";
|
||||||
|
@ -26,6 +26,7 @@ effect after you run <command>nixos-rebuild</command>.</para>
|
|||||||
|
|
||||||
<!-- FIXME: auto-include NixOS module docs -->
|
<!-- FIXME: auto-include NixOS module docs -->
|
||||||
<xi:include href="postgresql.xml" />
|
<xi:include href="postgresql.xml" />
|
||||||
|
<xi:include href="gitlab.xml" />
|
||||||
<xi:include href="acme.xml" />
|
<xi:include href="acme.xml" />
|
||||||
<xi:include href="nixos.xml" />
|
<xi:include href="nixos.xml" />
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ let
|
|||||||
cp -prd $sources/* . # */
|
cp -prd $sources/* . # */
|
||||||
chmod -R u+w .
|
chmod -R u+w .
|
||||||
cp ${../../modules/services/databases/postgresql.xml} configuration/postgresql.xml
|
cp ${../../modules/services/databases/postgresql.xml} configuration/postgresql.xml
|
||||||
|
cp ${../../modules/services/misc/gitlab.xml} configuration/gitlab.xml
|
||||||
cp ${../../modules/security/acme.xml} configuration/acme.xml
|
cp ${../../modules/security/acme.xml} configuration/acme.xml
|
||||||
cp ${../../modules/misc/nixos.xml} configuration/nixos.xml
|
cp ${../../modules/misc/nixos.xml} configuration/nixos.xml
|
||||||
ln -s ${optionsDocBook} options-db.xml
|
ln -s ${optionsDocBook} options-db.xml
|
||||||
|
@ -44,6 +44,7 @@ nixos.path = ./nixpkgs-unstable-2015-12-06/nixos;
|
|||||||
<listitem><para><literal>services/networking/pdnsd.nix</literal></para></listitem>
|
<listitem><para><literal>services/networking/pdnsd.nix</literal></para></listitem>
|
||||||
<listitem><para><literal>services/web-apps/pump.io.nix</literal></para></listitem>
|
<listitem><para><literal>services/web-apps/pump.io.nix</literal></para></listitem>
|
||||||
<listitem><para><literal>services/security/haka.nix</literal></para></listitem>
|
<listitem><para><literal>services/security/haka.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>i18n/inputMethod/default.nix</literal></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -197,6 +198,47 @@ fileSystems."/example" = {
|
|||||||
<literal>services.hardware.opengl.extraPackages{,32}</literal> instead. You can
|
<literal>services.hardware.opengl.extraPackages{,32}</literal> instead. You can
|
||||||
also specify VDPAU drivers there.</para>
|
also specify VDPAU drivers there.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>programs.ibus</literal> moved to <literal>i18n.inputMethod.ibus</literal>.
|
||||||
|
The option <literal>programs.ibus.plugins</literal> changed to <literal>i18n.inputMethod.ibus.engines</literal>
|
||||||
|
and the option to enable ibus changed from <literal>programs.ibus.enable</literal> to
|
||||||
|
<literal>i18n.inputMethod.enabled</literal>.
|
||||||
|
<literal>i18n.inputMethod.enabled</literal> should be set to the used input method name,
|
||||||
|
<literal>"ibus"</literal> for ibus.
|
||||||
|
An example of the new style:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
i18n.inputMethod.enabled = "ibus";
|
||||||
|
i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [ anthy mozc ];
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
That is equivalent to the old version:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
programs.ibus.enable = true;
|
||||||
|
programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ];
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para><literal>services.udev.extraRules</literal> option now writes rules
|
||||||
|
to <filename>99-local.rules</filename> instead of <filename>10-local.rules</filename>.
|
||||||
|
This makes all the user rules apply after others, so their results wouldn't be
|
||||||
|
overriden by anything else.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Large parts of the <literal>services.gitlab</literal> module has been
|
||||||
|
been rewritten. There are new configuration options available. The
|
||||||
|
<literal>stateDir</literal> option was renamned to
|
||||||
|
<literal>statePath</literal> and the <literal>satellitesDir</literal> option
|
||||||
|
was removed. Please review the currently available options.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
|
||||||
@ -215,6 +257,12 @@ fileSystems."/example" = {
|
|||||||
NixOS.</para>
|
NixOS.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Input method support was improved. New NixOS modules (fcitx, nabi and uim),
|
||||||
|
fcitx engines (chewing, hangul, m17n, mozc and table-other) and ibus engines (hangul and m17n)
|
||||||
|
have been added.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist></para>
|
</itemizedlist></para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
29
nixos/modules/i18n/inputMethod/default.nix
Normal file
29
nixos/modules/i18n/inputMethod/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enabled = mkOption {
|
||||||
|
type = types.nullOr (types.enum [ "ibus" "fcitx" "nabi" "uim" ]);
|
||||||
|
default = null;
|
||||||
|
example = "fcitx";
|
||||||
|
description = ''
|
||||||
|
Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices.
|
||||||
|
|
||||||
|
Input methods are specially used to input Chinese, Japanese and Korean characters.
|
||||||
|
|
||||||
|
Currently the following input methods are available in NixOS:
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>ibus: The intelligent input bus, extra input engines can be added using <literal>i18n.inputMethod.ibus.engines</literal>.</para></listitem>
|
||||||
|
<listitem><para>fcitx: A customizable lightweight input method, extra input engines can be added using <literal>i18n.inputMethod.fcitx.engines</literal>.</para></listitem>
|
||||||
|
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
|
||||||
|
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
42
nixos/modules/i18n/inputMethod/fcitx.nix
Normal file
42
nixos/modules/i18n/inputMethod/fcitx.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.i18n.inputMethod.fcitx;
|
||||||
|
fcitxPackage = pkgs.fcitx-with-plugins.override { plugins = cfg.engines; };
|
||||||
|
fcitxEngine = types.package // {
|
||||||
|
name = "fcitx-engine";
|
||||||
|
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x);
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
|
||||||
|
i18n.inputMethod.fcitx = {
|
||||||
|
engines = mkOption {
|
||||||
|
type = with types; listOf fcitxEngine;
|
||||||
|
default = [];
|
||||||
|
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
|
||||||
|
description = ''
|
||||||
|
Enabled Fcitx engines.
|
||||||
|
Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (config.i18n.inputMethod.enabled == "fcitx") {
|
||||||
|
environment.systemPackages = [ fcitxPackage ];
|
||||||
|
gtkPlugins = [ fcitxPackage ];
|
||||||
|
qtPlugins = [ fcitxPackage ];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
};
|
||||||
|
services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx";
|
||||||
|
};
|
||||||
|
}
|
43
nixos/modules/i18n/inputMethod/ibus.nix
Normal file
43
nixos/modules/i18n/inputMethod/ibus.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.i18n.inputMethod.ibus;
|
||||||
|
ibusPackage = pkgs.ibus-with-plugins.override { plugins = cfg.engines; };
|
||||||
|
ibusEngine = types.package // {
|
||||||
|
name = "ibus-engine";
|
||||||
|
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x);
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
i18n.inputMethod.ibus = {
|
||||||
|
engines = mkOption {
|
||||||
|
type = with types; listOf ibusEngine;
|
||||||
|
default = [];
|
||||||
|
example = literalExample "with pkgs.ibus-engines; [ mozc hangul ]";
|
||||||
|
description = ''
|
||||||
|
Enabled IBus engines.
|
||||||
|
Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A ibus-engines`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (config.i18n.inputMethod.enabled == "ibus") {
|
||||||
|
# Without dconf enabled it is impossible to use IBus
|
||||||
|
environment.systemPackages = [ ibusPackage pkgs.gnome3.dconf ];
|
||||||
|
|
||||||
|
gtkPlugins = [ pkgs.ibus ];
|
||||||
|
qtPlugins = [ pkgs.ibus-qt ];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "ibus";
|
||||||
|
QT_IM_MODULE = "ibus";
|
||||||
|
XMODIFIERS = "@im=ibus";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.sessionCommands = "${ibusPackage}/bin/ibus-daemon --daemonize --xim --cache=none";
|
||||||
|
};
|
||||||
|
}
|
17
nixos/modules/i18n/inputMethod/nabi.nix
Normal file
17
nixos/modules/i18n/inputMethod/nabi.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
config = mkIf (config.i18n.inputMethod.enabled == "nabi") {
|
||||||
|
environment.systemPackages = [ pkgs.nabi ];
|
||||||
|
qtPlugins = [ pkgs.nabi ];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "nabi";
|
||||||
|
QT_IM_MODULE = "nabi";
|
||||||
|
XMODIFIERS = "@im=nabi";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.sessionCommands = "${pkgs.nabi}/bin/nabi &";
|
||||||
|
};
|
||||||
|
}
|
39
nixos/modules/i18n/inputMethod/uim.nix
Normal file
39
nixos/modules/i18n/inputMethod/uim.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.i18n.inputMethod.uim;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
|
||||||
|
i18n.inputMethod.uim = {
|
||||||
|
toolbar = mkOption {
|
||||||
|
type = types.enum [ "gtk" "gtk3" "gtk-systray" "gtk3-systray" "qt4" ];
|
||||||
|
default = "gtk";
|
||||||
|
example = "gtk-systray";
|
||||||
|
description = ''
|
||||||
|
selected UIM toolbar.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (config.i18n.inputMethod.enabled == "uim") {
|
||||||
|
environment.systemPackages = [ pkgs.uim ];
|
||||||
|
gtkPlugins = [ pkgs.uim ];
|
||||||
|
qtPlugins = [ pkgs.uim ];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "uim";
|
||||||
|
QT_IM_MODULE = "uim";
|
||||||
|
XMODIFIERS = "@im=uim";
|
||||||
|
};
|
||||||
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
|
${pkgs.uim}/bin/uim-xim &
|
||||||
|
${pkgs.uim}/bin/uim-toolbar-${cfg.toolbar} &
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -252,6 +252,7 @@
|
|||||||
gammu-smsd = 228;
|
gammu-smsd = 228;
|
||||||
pdnsd = 229;
|
pdnsd = 229;
|
||||||
octoprint = 230;
|
octoprint = 230;
|
||||||
|
avahi-autoipd = 231;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||||
|
|
||||||
|
@ -43,6 +43,11 @@
|
|||||||
./hardware/video/nvidia.nix
|
./hardware/video/nvidia.nix
|
||||||
./hardware/video/ati.nix
|
./hardware/video/ati.nix
|
||||||
./hardware/video/webcam/facetimehd.nix
|
./hardware/video/webcam/facetimehd.nix
|
||||||
|
./i18n/inputMethod/default.nix
|
||||||
|
./i18n/inputMethod/fcitx.nix
|
||||||
|
./i18n/inputMethod/ibus.nix
|
||||||
|
./i18n/inputMethod/nabi.nix
|
||||||
|
./i18n/inputMethod/uim.nix
|
||||||
./installer/tools/auto-upgrade.nix
|
./installer/tools/auto-upgrade.nix
|
||||||
./installer/tools/nixos-checkout.nix
|
./installer/tools/nixos-checkout.nix
|
||||||
./installer/tools/tools.nix
|
./installer/tools/tools.nix
|
||||||
@ -66,7 +71,6 @@
|
|||||||
./programs/environment.nix
|
./programs/environment.nix
|
||||||
./programs/freetds.nix
|
./programs/freetds.nix
|
||||||
./programs/fish.nix
|
./programs/fish.nix
|
||||||
./programs/ibus.nix
|
|
||||||
./programs/kbdlight.nix
|
./programs/kbdlight.nix
|
||||||
./programs/light.nix
|
./programs/light.nix
|
||||||
./programs/man.nix
|
./programs/man.nix
|
||||||
@ -89,6 +93,7 @@
|
|||||||
./security/ca.nix
|
./security/ca.nix
|
||||||
./security/duosec.nix
|
./security/duosec.nix
|
||||||
./security/grsecurity.nix
|
./security/grsecurity.nix
|
||||||
|
./security/oath.nix
|
||||||
./security/pam.nix
|
./security/pam.nix
|
||||||
./security/pam_usb.nix
|
./security/pam_usb.nix
|
||||||
./security/pam_mount.nix
|
./security/pam_mount.nix
|
||||||
@ -253,6 +258,7 @@
|
|||||||
./services/monitoring/dd-agent.nix
|
./services/monitoring/dd-agent.nix
|
||||||
./services/monitoring/grafana.nix
|
./services/monitoring/grafana.nix
|
||||||
./services/monitoring/graphite.nix
|
./services/monitoring/graphite.nix
|
||||||
|
./services/monitoring/hdaps.nix
|
||||||
./services/monitoring/heapster.nix
|
./services/monitoring/heapster.nix
|
||||||
./services/monitoring/longview.nix
|
./services/monitoring/longview.nix
|
||||||
./services/monitoring/monit.nix
|
./services/monitoring/monit.nix
|
||||||
@ -271,6 +277,7 @@
|
|||||||
./services/monitoring/zabbix-agent.nix
|
./services/monitoring/zabbix-agent.nix
|
||||||
./services/monitoring/zabbix-server.nix
|
./services/monitoring/zabbix-server.nix
|
||||||
./services/network-filesystems/drbd.nix
|
./services/network-filesystems/drbd.nix
|
||||||
|
./services/network-filesystems/netatalk.nix
|
||||||
./services/network-filesystems/nfsd.nix
|
./services/network-filesystems/nfsd.nix
|
||||||
./services/network-filesystems/openafs-client/default.nix
|
./services/network-filesystems/openafs-client/default.nix
|
||||||
./services/network-filesystems/rsyncd.nix
|
./services/network-filesystems/rsyncd.nix
|
||||||
@ -442,6 +449,7 @@
|
|||||||
./services/x11/display-managers/lightdm.nix
|
./services/x11/display-managers/lightdm.nix
|
||||||
./services/x11/display-managers/sddm.nix
|
./services/x11/display-managers/sddm.nix
|
||||||
./services/x11/display-managers/slim.nix
|
./services/x11/display-managers/slim.nix
|
||||||
|
./services/x11/hardware/libinput.nix
|
||||||
./services/x11/hardware/multitouch.nix
|
./services/x11/hardware/multitouch.nix
|
||||||
./services/x11/hardware/synaptics.nix
|
./services/x11/hardware/synaptics.nix
|
||||||
./services/x11/hardware/wacom.nix
|
./services/x11/hardware/wacom.nix
|
||||||
|
@ -14,4 +14,6 @@
|
|||||||
# to the *boot time* of the host).
|
# to the *boot time* of the host).
|
||||||
hwclock -s
|
hwclock -s
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
security.rngd.enable = false;
|
||||||
}
|
}
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.programs.ibus;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
|
|
||||||
programs.ibus = {
|
|
||||||
enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
description = "Enable IBus input method";
|
|
||||||
};
|
|
||||||
plugins = mkOption {
|
|
||||||
type = lib.types.listOf lib.types.path;
|
|
||||||
default = [];
|
|
||||||
description = ''
|
|
||||||
IBus plugin packages
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [ pkgs.ibus pkgs.gnome3.dconf ];
|
|
||||||
|
|
||||||
gtkPlugins = [ pkgs.ibus ];
|
|
||||||
qtPlugins = [ pkgs.ibus-qt ];
|
|
||||||
|
|
||||||
environment.variables =
|
|
||||||
let
|
|
||||||
env = pkgs.buildEnv {
|
|
||||||
name = "ibus-env";
|
|
||||||
paths = [ pkgs.ibus ] ++ cfg.plugins;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
GTK_IM_MODULE = "ibus";
|
|
||||||
QT_IM_MODULE = "ibus";
|
|
||||||
XMODIFIERS = "@im=ibus";
|
|
||||||
|
|
||||||
IBUS_COMPONENT_PATH = "${env}/share/ibus/component";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.ibus}/bin/ibus-daemon --daemonize --xim --cache=none";
|
|
||||||
};
|
|
||||||
}
|
|
@ -28,6 +28,9 @@ with lib;
|
|||||||
(mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
|
(mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
|
||||||
|
|
||||||
|
(mkRenamedOptionModule [ "services" "gitlab" "stateDir" ] [ "services" "gitlab" "statePath" ])
|
||||||
|
(mkRemovedOptionModule [ "services" "gitlab" "satelliteDir" ])
|
||||||
|
|
||||||
# Old Grub-related options.
|
# Old Grub-related options.
|
||||||
(mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
|
(mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
|
||||||
(mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
|
(mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
|
||||||
@ -59,6 +62,9 @@ with lib;
|
|||||||
# Tarsnap
|
# Tarsnap
|
||||||
(mkRenamedOptionModule [ "services" "tarsnap" "config" ] [ "services" "tarsnap" "archives" ])
|
(mkRenamedOptionModule [ "services" "tarsnap" "config" ] [ "services" "tarsnap" "archives" ])
|
||||||
|
|
||||||
|
# ibus
|
||||||
|
(mkRenamedOptionModule [ "programs" "ibus" "plugins" ] [ "i18n" "inputMethod" "ibus" "engines" ])
|
||||||
|
|
||||||
# proxy
|
# proxy
|
||||||
(mkRenamedOptionModule [ "nix" "proxy" ] [ "networking" "proxy" "default" ])
|
(mkRenamedOptionModule [ "nix" "proxy" ] [ "networking" "proxy" "default" ])
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ let
|
|||||||
|
|
||||||
plugins = mkOption {
|
plugins = mkOption {
|
||||||
type = types.listOf (types.enum [
|
type = types.listOf (types.enum [
|
||||||
"cert.der" "cert.pem" "chain.pem" "external_pem.sh"
|
"cert.der" "cert.pem" "chain.pem" "external.sh"
|
||||||
"fullchain.pem" "full.pem" "key.der" "key.pem" "account_key.json"
|
"fullchain.pem" "full.pem" "key.der" "key.pem" "account_key.json"
|
||||||
]);
|
]);
|
||||||
default = [ "fullchain.pem" "key.pem" "account_key.json" ];
|
default = [ "fullchain.pem" "key.pem" "account_key.json" ];
|
||||||
|
50
nixos/modules/security/oath.nix
Normal file
50
nixos/modules/security/oath.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# This module provides configuration for the OATH PAM modules.
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
|
||||||
|
security.pam.oath = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable the OATH (one-time password) PAM module.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
digits = mkOption {
|
||||||
|
type = types.enum [ 6 7 8 ];
|
||||||
|
default = 6;
|
||||||
|
description = ''
|
||||||
|
Specify the length of the one-time password in number of
|
||||||
|
digits.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
window = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 5;
|
||||||
|
description = ''
|
||||||
|
Specify the number of one-time passwords to check in order
|
||||||
|
to accommodate for situations where the system and the
|
||||||
|
client are slightly out of sync (iteration for HOTP or time
|
||||||
|
steps for TOTP).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
usersFile = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = "/etc/users.oath";
|
||||||
|
description = ''
|
||||||
|
Set the path to file where the user's credentials are
|
||||||
|
stored. This file must not be world readable!
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
@ -75,7 +75,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
oathAuth = mkOption {
|
oathAuth = mkOption {
|
||||||
default = config.security.pam.enableOATH;
|
default = config.security.pam.oath.enable;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
If set, the OATH Toolkit will be used.
|
If set, the OATH Toolkit will be used.
|
||||||
@ -259,8 +259,8 @@ let
|
|||||||
"auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"}
|
"auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"}
|
||||||
${optionalString cfg.otpwAuth
|
${optionalString cfg.otpwAuth
|
||||||
"auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"}
|
"auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"}
|
||||||
${optionalString cfg.oathAuth
|
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
|
||||||
"auth sufficient ${pkgs.oathToolkit}/lib/security/pam_oath.so window=5 usersfile=/etc/users.oath"}
|
"auth sufficient ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"}
|
||||||
${optionalString config.users.ldap.enable
|
${optionalString config.users.ldap.enable
|
||||||
"auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"}
|
"auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"}
|
||||||
${optionalString config.krb5.enable ''
|
${optionalString config.krb5.enable ''
|
||||||
@ -302,8 +302,6 @@ let
|
|||||||
"session optional ${pam_krb5}/lib/security/pam_krb5.so"}
|
"session optional ${pam_krb5}/lib/security/pam_krb5.so"}
|
||||||
${optionalString cfg.otpwAuth
|
${optionalString cfg.otpwAuth
|
||||||
"session optional ${pkgs.otpw}/lib/security/pam_otpw.so"}
|
"session optional ${pkgs.otpw}/lib/security/pam_otpw.so"}
|
||||||
${optionalString cfg.oathAuth
|
|
||||||
"session optional ${pkgs.oathToolkit}/lib/security/pam_oath.so window=5 usersfile=/etc/users.oath"}
|
|
||||||
${optionalString cfg.startSession
|
${optionalString cfg.startSession
|
||||||
"session optional ${pkgs.systemd}/lib/security/pam_systemd.so"}
|
"session optional ${pkgs.systemd}/lib/security/pam_systemd.so"}
|
||||||
${optionalString cfg.forwardXAuth
|
${optionalString cfg.forwardXAuth
|
||||||
@ -405,13 +403,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pam.enableOATH = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Enable the OATH (one-time password) PAM module.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pam.enableU2F = mkOption {
|
security.pam.enableU2F = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
@ -446,7 +437,7 @@ in
|
|||||||
++ optional config.users.ldap.enable pam_ldap
|
++ optional config.users.ldap.enable pam_ldap
|
||||||
++ optionals config.krb5.enable [pam_krb5 pam_ccreds]
|
++ optionals config.krb5.enable [pam_krb5 pam_ccreds]
|
||||||
++ optionals config.security.pam.enableOTPW [ pkgs.otpw ]
|
++ optionals config.security.pam.enableOTPW [ pkgs.otpw ]
|
||||||
++ optionals config.security.pam.enableOATH [ pkgs.oathToolkit ]
|
++ optionals config.security.pam.oath.enable [ pkgs.oathToolkit ]
|
||||||
++ optionals config.security.pam.enableU2F [ pkgs.pam_u2f ]
|
++ optionals config.security.pam.enableU2F [ pkgs.pam_u2f ]
|
||||||
++ optionals config.security.pam.enableEcryptfs [ pkgs.ecryptfs ];
|
++ optionals config.security.pam.enableEcryptfs [ pkgs.ecryptfs ];
|
||||||
|
|
||||||
|
@ -21,7 +21,13 @@ in
|
|||||||
hardware.sane.enable = mkOption {
|
hardware.sane.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable support for SANE scanners.";
|
description = ''
|
||||||
|
Enable support for SANE scanners.
|
||||||
|
|
||||||
|
<note><para>
|
||||||
|
Users in the "scanner" group will gain access to the scanner.
|
||||||
|
</para></note>
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.snapshot = mkOption {
|
hardware.sane.snapshot = mkOption {
|
||||||
@ -33,7 +39,14 @@ in
|
|||||||
hardware.sane.extraBackends = mkOption {
|
hardware.sane.extraBackends = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Packages providing extra SANE backends to enable.";
|
description = ''
|
||||||
|
Packages providing extra SANE backends to enable.
|
||||||
|
|
||||||
|
<note><para>
|
||||||
|
The example contains the package for HP scanners.
|
||||||
|
</para></note>
|
||||||
|
'';
|
||||||
|
example = literalExample "[ pkgs.hplipWithPlugin ]";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.configDir = mkOption {
|
hardware.sane.configDir = mkOption {
|
||||||
|
@ -13,13 +13,13 @@ let
|
|||||||
extraUdevRules = pkgs.writeTextFile {
|
extraUdevRules = pkgs.writeTextFile {
|
||||||
name = "extra-udev-rules";
|
name = "extra-udev-rules";
|
||||||
text = cfg.extraRules;
|
text = cfg.extraRules;
|
||||||
destination = "/etc/udev/rules.d/10-local.rules";
|
destination = "/etc/udev/rules.d/99-local.rules";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraHwdbFile = pkgs.writeTextFile {
|
extraHwdbFile = pkgs.writeTextFile {
|
||||||
name = "extra-hwdb-file";
|
name = "extra-hwdb-file";
|
||||||
text = cfg.extraHwdb;
|
text = cfg.extraHwdb;
|
||||||
destination = "/etc/udev/hwdb.d/10-local.hwdb";
|
destination = "/etc/udev/hwdb.d/99-local.hwdb";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosRules = ''
|
nixosRules = ''
|
||||||
@ -212,8 +212,8 @@ in
|
|||||||
type = types.lines;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Additional <command>udev</command> rules. They'll be written
|
Additional <command>udev</command> rules. They'll be written
|
||||||
into file <filename>10-local.rules</filename>. Thus they are
|
into file <filename>99-local.rules</filename>. Thus they are
|
||||||
read before all other rules.
|
read and applied after all other rules.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -187,7 +187,6 @@ working_directory ENV["GITLAB_PATH"]
|
|||||||
pid ENV["UNICORN_PATH"] + "/tmp/pids/unicorn.pid"
|
pid ENV["UNICORN_PATH"] + "/tmp/pids/unicorn.pid"
|
||||||
|
|
||||||
listen ENV["UNICORN_PATH"] + "/tmp/sockets/gitlab.socket", :backlog => 1024
|
listen ENV["UNICORN_PATH"] + "/tmp/sockets/gitlab.socket", :backlog => 1024
|
||||||
listen "127.0.0.1:8080", :tcp_nopush => true
|
|
||||||
|
|
||||||
timeout 60
|
timeout 60
|
||||||
|
|
||||||
|
@ -7,10 +7,13 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.gitlab;
|
cfg = config.services.gitlab;
|
||||||
|
|
||||||
ruby = pkgs.gitlab.ruby;
|
ruby = cfg.packages.gitlab.ruby;
|
||||||
bundler = pkgs.bundler;
|
bundler = pkgs.bundler;
|
||||||
|
|
||||||
gemHome = "${pkgs.gitlab.env}/${ruby.gemPath}";
|
gemHome = "${cfg.packages.gitlab.env}/${ruby.gemPath}";
|
||||||
|
|
||||||
|
gitlabSocket = "${cfg.statePath}/tmp/sockets/gitlab.socket";
|
||||||
|
pathUrlQuote = url: replaceStrings ["/"] ["%2F"] url;
|
||||||
|
|
||||||
databaseYml = ''
|
databaseYml = ''
|
||||||
production:
|
production:
|
||||||
@ -21,14 +24,15 @@ let
|
|||||||
username: ${cfg.databaseUsername}
|
username: ${cfg.databaseUsername}
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
'';
|
'';
|
||||||
|
|
||||||
gitlabShellYml = ''
|
gitlabShellYml = ''
|
||||||
user: gitlab
|
user: ${cfg.user}
|
||||||
gitlab_url: "http://${cfg.host}:${toString cfg.port}/"
|
gitlab_url: "http+unix://${pathUrlQuote gitlabSocket}"
|
||||||
http_settings:
|
http_settings:
|
||||||
self_signed_cert: false
|
self_signed_cert: false
|
||||||
repos_path: "${cfg.stateDir}/repositories"
|
repos_path: "${cfg.statePath}/repositories"
|
||||||
secret_file: "${cfg.stateDir}/config/gitlab_shell_secret"
|
secret_file: "${cfg.statePath}/config/gitlab_shell_secret"
|
||||||
log_file: "${cfg.stateDir}/log/gitlab-shell.log"
|
log_file: "${cfg.statePath}/log/gitlab-shell.log"
|
||||||
redis:
|
redis:
|
||||||
bin: ${pkgs.redis}/bin/redis-cli
|
bin: ${pkgs.redis}/bin/redis-cli
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
@ -37,33 +41,102 @@ let
|
|||||||
namespace: resque:gitlab
|
namespace: resque:gitlab
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
gitlabConfig = {
|
||||||
|
# These are the default settings from config/gitlab.example.yml
|
||||||
|
production = flip recursiveUpdate cfg.extraConfig {
|
||||||
|
gitlab = {
|
||||||
|
host = cfg.host;
|
||||||
|
port = cfg.port;
|
||||||
|
https = cfg.https;
|
||||||
|
user = cfg.user;
|
||||||
|
email_enabled = true;
|
||||||
|
email_display_name = "GitLab";
|
||||||
|
email_reply_to = "noreply@localhost";
|
||||||
|
default_theme = 2;
|
||||||
|
default_projects_features = {
|
||||||
|
issues = true;
|
||||||
|
merge_requests = true;
|
||||||
|
wiki = true;
|
||||||
|
snippets = false;
|
||||||
|
builds = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
artifacts = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
lfs = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
gravatar = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
cron_jobs = {
|
||||||
|
stuck_ci_builds_worker = {
|
||||||
|
cron = "0 0 * * *";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gitlab_ci = {
|
||||||
|
builds_path = "${cfg.statePath}/builds";
|
||||||
|
};
|
||||||
|
ldap = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
omniauth = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
shared = {
|
||||||
|
path = "${cfg.statePath}/shared";
|
||||||
|
};
|
||||||
|
backup = {
|
||||||
|
path = "${cfg.backupPath}";
|
||||||
|
};
|
||||||
|
gitlab_shell = {
|
||||||
|
path = "${cfg.packages.gitlab-shell}";
|
||||||
|
repos_path = "${cfg.statePath}/repositories";
|
||||||
|
hooks_path = "${cfg.statePath}/shell/hooks";
|
||||||
|
secret_file = "${cfg.statePath}/config/gitlab_shell_secret";
|
||||||
|
upload_pack = true;
|
||||||
|
receive_pack = true;
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
bin_path = "git";
|
||||||
|
max_size = 20971520; # 20MB
|
||||||
|
timeout = 10;
|
||||||
|
};
|
||||||
|
extra = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gitlabEnv = {
|
||||||
|
HOME = "${cfg.statePath}/home";
|
||||||
|
GEM_HOME = gemHome;
|
||||||
|
BUNDLE_GEMFILE = "${cfg.packages.gitlab}/share/gitlab/Gemfile";
|
||||||
|
UNICORN_PATH = "${cfg.statePath}/";
|
||||||
|
GITLAB_PATH = "${cfg.packages.gitlab}/share/gitlab/";
|
||||||
|
GITLAB_STATE_PATH = "${cfg.statePath}";
|
||||||
|
GITLAB_UPLOADS_PATH = "${cfg.statePath}/uploads";
|
||||||
|
GITLAB_LOG_PATH = "${cfg.statePath}/log";
|
||||||
|
GITLAB_SHELL_PATH = "${cfg.packages.gitlab-shell}";
|
||||||
|
GITLAB_SHELL_CONFIG_PATH = "${cfg.statePath}/shell/config.yml";
|
||||||
|
GITLAB_SHELL_SECRET_PATH = "${cfg.statePath}/config/gitlab_shell_secret";
|
||||||
|
GITLAB_SHELL_HOOKS_PATH = "${cfg.statePath}/shell/hooks";
|
||||||
|
RAILS_ENV = "production";
|
||||||
|
};
|
||||||
|
|
||||||
unicornConfig = builtins.readFile ./defaultUnicornConfig.rb;
|
unicornConfig = builtins.readFile ./defaultUnicornConfig.rb;
|
||||||
|
|
||||||
gitlab-runner = pkgs.stdenv.mkDerivation rec {
|
gitlab-runner = pkgs.stdenv.mkDerivation rec {
|
||||||
name = "gitlab-runner";
|
name = "gitlab-runner";
|
||||||
buildInputs = [ pkgs.gitlab pkgs.bundler pkgs.makeWrapper ];
|
buildInputs = [ cfg.packages.gitlab bundler pkgs.makeWrapper ];
|
||||||
phases = "installPhase fixupPhase";
|
phases = "installPhase fixupPhase";
|
||||||
buildPhase = "";
|
buildPhase = "";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
makeWrapper ${bundler}/bin/bundle $out/bin/gitlab-runner\
|
makeWrapper ${bundler}/bin/bundle $out/bin/gitlab-runner \
|
||||||
--set RAKEOPT '"-f ${pkgs.gitlab}/share/gitlab/Rakefile"'\
|
${concatStrings (mapAttrsToList (name: value: "--set ${name} '\"${value}\"' ") gitlabEnv)} \
|
||||||
--set GEM_HOME '${gemHome}'\
|
--set GITLAB_CONFIG_PATH '"${cfg.statePath}/config"' \
|
||||||
--set UNICORN_PATH "${cfg.stateDir}/"\
|
--set PATH '"${pkgs.nodejs}/bin:${pkgs.gzip}/bin:${config.services.postgresql.package}/bin:$PATH"' \
|
||||||
--set GITLAB_PATH "${pkgs.gitlab}/share/gitlab/"\
|
--set RAKEOPT '"-f ${cfg.packages.gitlab}/share/gitlab/Rakefile"'
|
||||||
--set GITLAB_APPLICATION_LOG_PATH "${cfg.stateDir}/log/application.log"\
|
|
||||||
--set GITLAB_SATELLITES_PATH "${cfg.stateDir}/satellites"\
|
|
||||||
--set GITLAB_SHELL_PATH "${pkgs.gitlab-shell}"\
|
|
||||||
--set GITLAB_REPOSITORIES_PATH "${cfg.stateDir}/repositories"\
|
|
||||||
--set GITLAB_SHELL_HOOKS_PATH "${cfg.stateDir}/shell/hooks"\
|
|
||||||
--set BUNDLE_GEMFILE "${pkgs.gitlab}/share/gitlab/Gemfile"\
|
|
||||||
--set GITLAB_EMAIL_FROM "${cfg.emailFrom}"\
|
|
||||||
--set GITLAB_SHELL_CONFIG_PATH "${cfg.stateDir}/shell/config.yml"\
|
|
||||||
--set GITLAB_SHELL_SECRET_PATH "${cfg.stateDir}/config/gitlab_shell_secret"\
|
|
||||||
--set GITLAB_HOST "${cfg.host}"\
|
|
||||||
--set GITLAB_PORT "${toString cfg.port}"\
|
|
||||||
--set GITLAB_BACKUP_PATH "${cfg.backupPath}"\
|
|
||||||
--set RAILS_ENV "production"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,13 +152,25 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
satelliteDir = mkOption {
|
packages.gitlab = mkOption {
|
||||||
type = types.str;
|
type = types.package;
|
||||||
default = "/var/gitlab/git-satellites";
|
default = pkgs.gitlab;
|
||||||
description = "Gitlab directory to store checked out git trees requires for operation.";
|
description = "Reference to the gitlab package";
|
||||||
};
|
};
|
||||||
|
|
||||||
stateDir = mkOption {
|
packages.gitlab-shell = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.gitlab-shell;
|
||||||
|
description = "Reference to the gitlab-shell package";
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.gitlab-workhorse = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.gitlab-workhorse;
|
||||||
|
description = "Reference to the gitlab-workhorse package";
|
||||||
|
};
|
||||||
|
|
||||||
|
statePath = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "/var/gitlab/state";
|
default = "/var/gitlab/state";
|
||||||
description = "Gitlab state directory, logs are stored here.";
|
description = "Gitlab state directory, logs are stored here.";
|
||||||
@ -93,7 +178,7 @@ in {
|
|||||||
|
|
||||||
backupPath = mkOption {
|
backupPath = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = cfg.stateDir + "/backup";
|
default = cfg.statePath + "/backup";
|
||||||
description = "Gitlab path for backups.";
|
description = "Gitlab path for backups.";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -136,14 +221,67 @@ in {
|
|||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 8080;
|
default = 8080;
|
||||||
description = "Gitlab server listening port.";
|
description = ''
|
||||||
|
Gitlab server port for copy-paste URLs, e.g. 80 or 443 if you're
|
||||||
|
service over https.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
https = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether gitlab prints URLs with https as scheme.";
|
||||||
|
};
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "gitlab";
|
||||||
|
description = "User to run gitlab and all related services.";
|
||||||
|
};
|
||||||
|
|
||||||
|
group = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "gitlab";
|
||||||
|
description = "Group to run gitlab and all related services.";
|
||||||
|
};
|
||||||
|
|
||||||
|
initialRootEmail = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "admin@local.host";
|
||||||
|
description = ''
|
||||||
|
Initial email address of the root account if this is a new install.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
initialRootPassword = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "UseNixOS!";
|
||||||
|
description = ''
|
||||||
|
Initial password of the root account if this is a new install.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
default = {};
|
||||||
|
example = {
|
||||||
|
gitlab = {
|
||||||
|
default_projects_features = {
|
||||||
|
builds = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Extra options to be merged into config/gitlab.yml as nix
|
||||||
|
attribute set.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.git gitlab-runner pkgs.gitlab-shell ];
|
environment.systemPackages = [ pkgs.git gitlab-runner cfg.packages.gitlab-shell ];
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{ assertion = cfg.databasePassword != "";
|
{ assertion = cfg.databasePassword != "";
|
||||||
@ -159,39 +297,24 @@ in {
|
|||||||
services.postfix.enable = mkDefault true;
|
services.postfix.enable = mkDefault true;
|
||||||
|
|
||||||
users.extraUsers = [
|
users.extraUsers = [
|
||||||
{ name = "gitlab";
|
{ name = cfg.user;
|
||||||
group = "gitlab";
|
group = cfg.group;
|
||||||
home = "${cfg.stateDir}/home";
|
home = "${cfg.statePath}/home";
|
||||||
shell = "${pkgs.bash}/bin/bash";
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
uid = config.ids.uids.gitlab;
|
uid = config.ids.uids.gitlab;
|
||||||
} ];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
users.extraGroups = [
|
users.extraGroups = [
|
||||||
{ name = "gitlab";
|
{ name = cfg.group;
|
||||||
gid = config.ids.gids.gitlab;
|
gid = config.ids.gids.gitlab;
|
||||||
} ];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.gitlab-sidekiq = {
|
systemd.services.gitlab-sidekiq = {
|
||||||
after = [ "network.target" "redis.service" ];
|
after = [ "network.target" "redis.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.HOME = "${cfg.stateDir}/home";
|
environment = gitlabEnv;
|
||||||
environment.GEM_HOME = gemHome;
|
|
||||||
environment.UNICORN_PATH = "${cfg.stateDir}/";
|
|
||||||
environment.GITLAB_PATH = "${pkgs.gitlab}/share/gitlab/";
|
|
||||||
environment.GITLAB_APPLICATION_LOG_PATH = "${cfg.stateDir}/log/application.log";
|
|
||||||
environment.GITLAB_SATELLITES_PATH = "${cfg.stateDir}/satellites";
|
|
||||||
environment.GITLAB_SHELL_PATH = "${pkgs.gitlab-shell}";
|
|
||||||
environment.GITLAB_REPOSITORIES_PATH = "${cfg.stateDir}/repositories";
|
|
||||||
environment.GITLAB_SHELL_HOOKS_PATH = "${cfg.stateDir}/shell/hooks";
|
|
||||||
environment.BUNDLE_GEMFILE = "${pkgs.gitlab}/share/gitlab/Gemfile";
|
|
||||||
environment.GITLAB_EMAIL_FROM = "${cfg.emailFrom}";
|
|
||||||
environment.GITLAB_SHELL_CONFIG_PATH = "${cfg.stateDir}/shell/config.yml";
|
|
||||||
environment.GITLAB_SHELL_SECRET_PATH = "${cfg.stateDir}/config/gitlab_shell_secret";
|
|
||||||
environment.GITLAB_HOST = "${cfg.host}";
|
|
||||||
environment.GITLAB_PORT = "${toString cfg.port}";
|
|
||||||
environment.GITLAB_DATABASE_HOST = "${cfg.databaseHost}";
|
|
||||||
environment.GITLAB_DATABASE_PASSWORD = "${cfg.databasePassword}";
|
|
||||||
environment.RAILS_ENV = "production";
|
|
||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
config.services.postgresql.package
|
config.services.postgresql.package
|
||||||
gitAndTools.git
|
gitAndTools.git
|
||||||
@ -201,116 +324,131 @@ in {
|
|||||||
];
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "gitlab";
|
User = cfg.user;
|
||||||
Group = "gitlab";
|
Group = cfg.group;
|
||||||
TimeoutSec = "300";
|
TimeoutSec = "300";
|
||||||
WorkingDirectory = "${pkgs.gitlab}/share/gitlab";
|
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
|
||||||
ExecStart="${bundler}/bin/bundle exec \"sidekiq -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P ${cfg.stateDir}/tmp/sidekiq.pid\"";
|
ExecStart="${bundler}/bin/bundle exec \"sidekiq -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P ${cfg.statePath}/tmp/sidekiq.pid\"";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.gitlab-git-http-server = {
|
systemd.services.gitlab-workhorse = {
|
||||||
after = [ "network.target" "gitlab.service" ];
|
after = [ "network.target" "gitlab.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.HOME = "${cfg.stateDir}/home";
|
environment.HOME = gitlabEnv.HOME;
|
||||||
|
environment.GITLAB_SHELL_CONFIG_PATH = gitlabEnv.GITLAB_SHELL_CONFIG_PATH;
|
||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
gitAndTools.git
|
gitAndTools.git
|
||||||
openssh
|
openssh
|
||||||
];
|
];
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p /run/gitlab
|
||||||
|
chown ${cfg.user}:${cfg.group} /run/gitlab
|
||||||
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
PermissionsStartOnly = true; # preStart must be run as root
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "gitlab";
|
User = cfg.user;
|
||||||
Group = "gitlab";
|
Group = cfg.group;
|
||||||
TimeoutSec = "300";
|
TimeoutSec = "300";
|
||||||
ExecStart = "${pkgs.gitlab-git-http-server}/bin/gitlab-git-http-server -listenUmask 0 -listenNetwork unix -listenAddr ${cfg.stateDir}/tmp/sockets/gitlab-git-http-server.socket -authBackend http://localhost:8080 ${cfg.stateDir}/repositories";
|
ExecStart =
|
||||||
|
"${cfg.packages.gitlab-workhorse}/bin/gitlab-workhorse "
|
||||||
|
+ "-listenUmask 0 "
|
||||||
|
+ "-listenNetwork unix "
|
||||||
|
+ "-listenAddr /run/gitlab/gitlab-workhorse.socket "
|
||||||
|
+ "-authSocket ${gitlabSocket} "
|
||||||
|
+ "-documentRoot ${cfg.packages.gitlab}/share/gitlab/public";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.gitlab = {
|
systemd.services.gitlab = {
|
||||||
after = [ "network.target" "postgresql.service" "redis.service" ];
|
after = [ "network.target" "postgresql.service" "redis.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.HOME = "${cfg.stateDir}/home";
|
environment = gitlabEnv;
|
||||||
environment.GEM_HOME = gemHome;
|
|
||||||
environment.UNICORN_PATH = "${cfg.stateDir}/";
|
|
||||||
environment.GITLAB_PATH = "${pkgs.gitlab}/share/gitlab/";
|
|
||||||
environment.GITLAB_APPLICATION_LOG_PATH = "${cfg.stateDir}/log/application.log";
|
|
||||||
environment.GITLAB_SATELLITES_PATH = "${cfg.stateDir}/satellites";
|
|
||||||
environment.GITLAB_SHELL_PATH = "${pkgs.gitlab-shell}";
|
|
||||||
environment.GITLAB_SHELL_CONFIG_PATH = "${cfg.stateDir}/shell/config.yml";
|
|
||||||
environment.GITLAB_SHELL_SECRET_PATH = "${cfg.stateDir}/config/gitlab_shell_secret";
|
|
||||||
environment.GITLAB_REPOSITORIES_PATH = "${cfg.stateDir}/repositories";
|
|
||||||
environment.GITLAB_SHELL_HOOKS_PATH = "${cfg.stateDir}/shell/hooks";
|
|
||||||
environment.BUNDLE_GEMFILE = "${pkgs.gitlab}/share/gitlab/Gemfile";
|
|
||||||
environment.GITLAB_EMAIL_FROM = "${cfg.emailFrom}";
|
|
||||||
environment.GITLAB_HOST = "${cfg.host}";
|
|
||||||
environment.GITLAB_PORT = "${toString cfg.port}";
|
|
||||||
environment.GITLAB_DATABASE_HOST = "${cfg.databaseHost}";
|
|
||||||
environment.GITLAB_DATABASE_PASSWORD = "${cfg.databasePassword}";
|
|
||||||
environment.RAILS_ENV = "production";
|
|
||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
config.services.postgresql.package
|
config.services.postgresql.package
|
||||||
gitAndTools.git
|
gitAndTools.git
|
||||||
ruby
|
|
||||||
openssh
|
openssh
|
||||||
nodejs
|
nodejs
|
||||||
];
|
];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
# TODO: use env vars
|
mkdir -p ${cfg.backupPath}
|
||||||
mkdir -p ${cfg.stateDir}
|
mkdir -p ${cfg.statePath}/builds
|
||||||
mkdir -p ${cfg.stateDir}/log
|
mkdir -p ${cfg.statePath}/repositories
|
||||||
mkdir -p ${cfg.stateDir}/satellites
|
mkdir -p ${gitlabConfig.production.shared.path}/artifacts
|
||||||
mkdir -p ${cfg.stateDir}/repositories
|
mkdir -p ${gitlabConfig.production.shared.path}/lfs-objects
|
||||||
mkdir -p ${cfg.stateDir}/shell/hooks
|
mkdir -p ${cfg.statePath}/log
|
||||||
mkdir -p ${cfg.stateDir}/tmp/pids
|
mkdir -p ${cfg.statePath}/shell
|
||||||
mkdir -p ${cfg.stateDir}/tmp/sockets
|
mkdir -p ${cfg.statePath}/tmp/pids
|
||||||
rm -rf ${cfg.stateDir}/config
|
mkdir -p ${cfg.statePath}/tmp/sockets
|
||||||
mkdir -p ${cfg.stateDir}/config
|
|
||||||
|
rm -rf ${cfg.statePath}/config ${cfg.statePath}/shell/hooks
|
||||||
|
mkdir -p ${cfg.statePath}/config ${cfg.statePath}/shell
|
||||||
|
|
||||||
# TODO: What exactly is gitlab-shell doing with the secret?
|
# TODO: What exactly is gitlab-shell doing with the secret?
|
||||||
tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 20 > ${cfg.stateDir}/config/gitlab_shell_secret
|
tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 20 > ${cfg.statePath}/config/gitlab_shell_secret
|
||||||
mkdir -p ${cfg.stateDir}/home/.ssh
|
|
||||||
touch ${cfg.stateDir}/home/.ssh/authorized_keys
|
|
||||||
|
|
||||||
cp -rf ${pkgs.gitlab}/share/gitlab/config ${cfg.stateDir}/
|
# The uploads directory is hardcoded somewhere deep in rails. It is
|
||||||
cp ${pkgs.gitlab}/share/gitlab/VERSION ${cfg.stateDir}/VERSION
|
# symlinked in the gitlab package to /run/gitlab/uploads to make it
|
||||||
|
# configurable
|
||||||
|
mkdir -p /run/gitlab
|
||||||
|
mkdir -p ${cfg.statePath}/uploads
|
||||||
|
ln -sf ${cfg.statePath}/uploads /run/gitlab/uploads
|
||||||
|
chown -R ${cfg.user}:${cfg.group} /run/gitlab
|
||||||
|
|
||||||
ln -fs ${pkgs.writeText "database.yml" databaseYml} ${cfg.stateDir}/config/database.yml
|
# Prepare home directory
|
||||||
ln -fs ${pkgs.writeText "unicorn.rb" unicornConfig} ${cfg.stateDir}/config/unicorn.rb
|
mkdir -p ${gitlabEnv.HOME}/.ssh
|
||||||
|
touch ${gitlabEnv.HOME}/.ssh/authorized_keys
|
||||||
|
chown -R ${cfg.user}:${cfg.group} ${gitlabEnv.HOME}/
|
||||||
|
chmod -R u+rwX,go-rwx+X ${gitlabEnv.HOME}/
|
||||||
|
|
||||||
chown -R gitlab:gitlab ${cfg.stateDir}/
|
cp -rf ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
|
||||||
chmod -R 755 ${cfg.stateDir}/
|
ln -sf ${cfg.statePath}/config /run/gitlab/config
|
||||||
|
cp ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
|
||||||
|
|
||||||
|
# JSON is a subset of YAML
|
||||||
|
ln -fs ${pkgs.writeText "gitlab.yml" (builtins.toJSON gitlabConfig)} ${cfg.statePath}/config/gitlab.yml
|
||||||
|
ln -fs ${pkgs.writeText "database.yml" databaseYml} ${cfg.statePath}/config/database.yml
|
||||||
|
ln -fs ${pkgs.writeText "unicorn.rb" unicornConfig} ${cfg.statePath}/config/unicorn.rb
|
||||||
|
|
||||||
|
chown -R ${cfg.user}:${cfg.group} ${cfg.statePath}/
|
||||||
|
chmod -R ug+rwX,o-rwx+X ${cfg.statePath}/
|
||||||
|
|
||||||
|
# Install the shell required to push repositories
|
||||||
|
ln -fs ${pkgs.writeText "config.yml" gitlabShellYml} "$GITLAB_SHELL_CONFIG_PATH"
|
||||||
|
ln -fs ${cfg.packages.gitlab-shell}/hooks "$GITLAB_SHELL_HOOKS_PATH"
|
||||||
|
${cfg.packages.gitlab-shell}/bin/install
|
||||||
|
|
||||||
if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
|
if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
|
||||||
if ! test -e "${cfg.stateDir}/db-created"; then
|
if ! test -e "${cfg.statePath}/db-created"; then
|
||||||
psql postgres -c "CREATE ROLE gitlab WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
|
psql postgres -c "CREATE ROLE gitlab WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
|
||||||
${config.services.postgresql.package}/bin/createdb --owner gitlab gitlab || true
|
${config.services.postgresql.package}/bin/createdb --owner gitlab gitlab || true
|
||||||
touch "${cfg.stateDir}/db-created"
|
touch "${cfg.statePath}/db-created"
|
||||||
|
|
||||||
# force=yes disables the manual-interaction yes/no prompt
|
# The gitlab:setup task is horribly broken somehow, these two tasks will do the same for setting up the initial database
|
||||||
# which breaks without an stdin.
|
${gitlab-runner}/bin/gitlab-runner exec rake db:migrate RAILS_ENV=production
|
||||||
force=yes ${bundler}/bin/bundle exec rake -f ${pkgs.gitlab}/share/gitlab/Rakefile gitlab:setup RAILS_ENV=production
|
${gitlab-runner}/bin/gitlab-runner exec rake db:seed_fu RAILS_ENV=production \
|
||||||
|
GITLAB_ROOT_PASSWORD="${cfg.initialRootPassword}" GITLAB_ROOT_EMAIL="${cfg.initialRootEmail}";
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${bundler}/bin/bundle exec rake -f ${pkgs.gitlab}/share/gitlab/Rakefile db:migrate RAILS_ENV=production
|
# Always do the db migrations just to be sure the database is up-to-date
|
||||||
# Install the shell required to push repositories
|
${gitlab-runner}/bin/gitlab-runner exec rake db:migrate RAILS_ENV=production
|
||||||
ln -fs ${pkgs.writeText "config.yml" gitlabShellYml} ${cfg.stateDir}/shell/config.yml
|
|
||||||
export GITLAB_SHELL_CONFIG_PATH=""${cfg.stateDir}/shell/config.yml
|
|
||||||
${pkgs.gitlab-shell}/bin/install
|
|
||||||
|
|
||||||
# Change permissions in the last step because some of the
|
# Change permissions in the last step because some of the
|
||||||
# intermediary scripts like to create directories as root.
|
# intermediary scripts like to create directories as root.
|
||||||
chown -R gitlab:gitlab ${cfg.stateDir}/
|
chown -R ${cfg.user}:${cfg.group} ${cfg.statePath}
|
||||||
chmod -R 755 ${cfg.stateDir}/
|
chmod -R u+rwX,go-rwx+X ${cfg.statePath}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
PermissionsStartOnly = true; # preStart must be run as root
|
PermissionsStartOnly = true; # preStart must be run as root
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "gitlab";
|
User = cfg.user;
|
||||||
Group = "gitlab";
|
Group = cfg.group;
|
||||||
TimeoutSec = "300";
|
TimeoutSec = "300";
|
||||||
WorkingDirectory = "${pkgs.gitlab}/share/gitlab";
|
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
|
||||||
ExecStart="${bundler}/bin/bundle exec \"unicorn -c ${cfg.stateDir}/config/unicorn.rb -E production\"";
|
ExecStart="${bundler}/bin/bundle exec \"unicorn -c ${cfg.statePath}/config/unicorn.rb -E production\"";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
103
nixos/modules/services/misc/gitlab.xml
Normal file
103
nixos/modules/services/misc/gitlab.xml
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="module-services-gitlab">
|
||||||
|
|
||||||
|
<title>Gitlab</title>
|
||||||
|
|
||||||
|
<para>Gitlab is a feature-rich git hosting service.</para>
|
||||||
|
|
||||||
|
<section><title>Prerequisites</title>
|
||||||
|
|
||||||
|
<para>The gitlab service exposes only an Unix socket at
|
||||||
|
<literal>/run/gitlab/gitlab-workhorse.socket</literal>. You need to configure a
|
||||||
|
webserver to proxy HTTP requests to the socket.</para>
|
||||||
|
|
||||||
|
<para>For instance, this could be used for Nginx:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
services.nginx.httpConfig = ''
|
||||||
|
server {
|
||||||
|
server_name git.example.com;
|
||||||
|
listen 443 ssl spdy;
|
||||||
|
listen [::]:443 ssl spdy;
|
||||||
|
|
||||||
|
ssl_certificate /var/lib/acme/git.example.com/fullchain.pem;
|
||||||
|
ssl_certificate_key /var/lib/acme/git.example.com/key.pem;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Ssl on;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_pass http://unix:/run/gitlab/gitlab-workhorse.socket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section><title>Configuring</title>
|
||||||
|
|
||||||
|
<para>Gitlab depends on both PostgreSQL and Redis and will automatically enable
|
||||||
|
both services. In the case of PostgreSQL, a database and a role will be created.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The default state dir is /var/gitlab/state. This is where all data like
|
||||||
|
the repositories and uploads will be stored.</para>
|
||||||
|
|
||||||
|
<para>A basic configuration could look like this:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
services.gitlab = {
|
||||||
|
enable = true;
|
||||||
|
databasePassword = "eXaMpl3";
|
||||||
|
initialRootPassword = "UseNixOS!";
|
||||||
|
https = true;
|
||||||
|
host = "git.example.com";
|
||||||
|
port = 443;
|
||||||
|
user = "git";
|
||||||
|
group = "git";
|
||||||
|
extraConfig = {
|
||||||
|
gitlab = {
|
||||||
|
default_projects_features = { builds = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>Refer to <xref linkend="ch-options" /> for all available configuration
|
||||||
|
options for the <literal>services.gitlab</literal> module.</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section><title>Maintenance</title>
|
||||||
|
|
||||||
|
<para>You can run all Gitlab related commands like rake tasks with
|
||||||
|
<literal>gitlab-runner</literal> which will be available on the system
|
||||||
|
when gitlab is enabled. You will have to run the commands as the user that
|
||||||
|
you configured to run gitlab.</para>
|
||||||
|
|
||||||
|
<para>For instance, to backup a Gitlab instance:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
$ sudo -u git -H gitlab-runner exec rake gitlab:backup:create
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
A list of all availabe rake tasks can be obtained by running:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
$ sudo -u git -H gitlab-runner exec rake -T
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</chapter>
|
@ -367,6 +367,8 @@ in
|
|||||||
// { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt"; }
|
// { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt"; }
|
||||||
// config.networking.proxy.envVars;
|
// config.networking.proxy.envVars;
|
||||||
|
|
||||||
|
unitConfig.RequiresMountsFor = "/nix/store";
|
||||||
|
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ Nice = cfg.daemonNiceLevel;
|
{ Nice = cfg.daemonNiceLevel;
|
||||||
IOSchedulingPriority = cfg.daemonIONiceLevel;
|
IOSchedulingPriority = cfg.daemonIONiceLevel;
|
||||||
|
@ -72,7 +72,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.nixosManual.ttyNumber = mkOption {
|
services.nixosManual.ttyNumber = mkOption {
|
||||||
default = "8";
|
type = types.int;
|
||||||
|
default = 8;
|
||||||
description = ''
|
description = ''
|
||||||
Virtual console on which to show the manual.
|
Virtual console on which to show the manual.
|
||||||
'';
|
'';
|
||||||
@ -96,7 +97,7 @@ in
|
|||||||
[ manual.manual help ]
|
[ manual.manual help ]
|
||||||
++ optional config.programs.man.enable manual.manpages;
|
++ optional config.programs.man.enable manual.manpages;
|
||||||
|
|
||||||
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
|
boot.extraTTYs = mkIf cfg.showManual ["tty${toString cfg.ttyNumber}"];
|
||||||
|
|
||||||
systemd.services = optionalAttrs cfg.showManual
|
systemd.services = optionalAttrs cfg.showManual
|
||||||
{ "nixos-manual" =
|
{ "nixos-manual" =
|
||||||
@ -106,7 +107,7 @@ in
|
|||||||
{ ExecStart = "${cfg.browser} ${entry}";
|
{ ExecStart = "${cfg.browser} ${entry}";
|
||||||
StandardInput = "tty";
|
StandardInput = "tty";
|
||||||
StandardOutput = "tty";
|
StandardOutput = "tty";
|
||||||
TTYPath = "/dev/tty${cfg.ttyNumber}";
|
TTYPath = "/dev/tty${toString cfg.ttyNumber}";
|
||||||
TTYReset = true;
|
TTYReset = true;
|
||||||
TTYVTDisallocate = true;
|
TTYVTDisallocate = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
22
nixos/modules/services/monitoring/hdaps.nix
Normal file
22
nixos/modules/services/monitoring/hdaps.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.hdapsd;
|
||||||
|
hdapsd = [ pkgs.hdapsd ];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.hdapsd.enable = mkEnableOption
|
||||||
|
''
|
||||||
|
Hard Drive Active Protection System Daemon,
|
||||||
|
devices are detected and managed automatically by udev and systemd
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.udev.packages = hdapsd;
|
||||||
|
systemd.packages = hdapsd;
|
||||||
|
};
|
||||||
|
}
|
150
nixos/modules/services/network-filesystems/netatalk.nix
Normal file
150
nixos/modules/services/network-filesystems/netatalk.nix
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.netatalk;
|
||||||
|
|
||||||
|
extmapFile = pkgs.writeText "extmap.conf" cfg.extmap;
|
||||||
|
|
||||||
|
afpToString = x: if builtins.typeOf x == "bool"
|
||||||
|
then (if x then "true" else "false")
|
||||||
|
else toString x;
|
||||||
|
|
||||||
|
volumeConfig = name:
|
||||||
|
let vol = getAttr name cfg.volumes; in
|
||||||
|
"[${name}]\n " + (toString (
|
||||||
|
map
|
||||||
|
(key: "${key} = ${afpToString (getAttr key vol)}\n")
|
||||||
|
(attrNames vol)
|
||||||
|
));
|
||||||
|
|
||||||
|
afpConf = ''[Global]
|
||||||
|
extmap file = ${extmapFile}
|
||||||
|
afp port = ${toString cfg.port}
|
||||||
|
|
||||||
|
${cfg.extraConfig}
|
||||||
|
|
||||||
|
${if cfg.homes.enable then ''[Homes]
|
||||||
|
${optionalString (cfg.homes.path != "") "path = ${cfg.homes.path}"}
|
||||||
|
basedir regex = ${cfg.homes.basedirRegex}
|
||||||
|
${cfg.homes.extraConfig}
|
||||||
|
'' else ""}
|
||||||
|
|
||||||
|
${toString (map volumeConfig (attrNames cfg.volumes))}
|
||||||
|
'';
|
||||||
|
|
||||||
|
afpConfFile = pkgs.writeText "afp.conf" afpConf;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.netatalk = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the Netatalk AFP fileserver.";
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
default = 548;
|
||||||
|
description = "TCP port to be used for AFP.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = "uam list = uams_guest.so";
|
||||||
|
description = ''
|
||||||
|
Lines of configuration to add to the <literal>[Global]</literal> section.
|
||||||
|
See <literal>man apf.conf</literal> for more information.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
homes = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable sharing of the UNIX server user home directories.";
|
||||||
|
};
|
||||||
|
|
||||||
|
path = mkOption {
|
||||||
|
default = "";
|
||||||
|
example = "afp-data";
|
||||||
|
description = "Share not the whole user home but this subdirectory path.";
|
||||||
|
};
|
||||||
|
|
||||||
|
basedirRegex = mkOption {
|
||||||
|
example = "/home";
|
||||||
|
description = "Regex which matches the parent directory of the user homes.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Lines of configuration to add to the <literal>[Homes]</literal> section.
|
||||||
|
See <literal>man apf.conf</literal> for more information.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
volumes = mkOption {
|
||||||
|
default = { };
|
||||||
|
type = types.attrsOf (types.attrsOf types.unspecified);
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Set of AFP volumes to export.
|
||||||
|
See <literal>man apf.conf</literal> for more information.
|
||||||
|
'';
|
||||||
|
example =
|
||||||
|
{ srv =
|
||||||
|
{ path = "/srv";
|
||||||
|
"read only" = true;
|
||||||
|
"hosts allow" = "10.1.0.0/16 10.2.1.100 2001:0db8:1234::/48";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extmap = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
File name extension mappings.
|
||||||
|
See <literal>man extmap.conf</literal> for more information.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
systemd.services.netatalk = {
|
||||||
|
description = "Netatalk AFP fileserver for Macintosh clients";
|
||||||
|
unitConfig.Documentation = "man:afp.conf(5) man:netatalk(8) man:afpd(8) man:cnid_metad(8) man:cnid_dbd(8)";
|
||||||
|
after = [ "network.target" "avahi-daemon.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
path = [ pkgs.netatalk ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "forking";
|
||||||
|
GuessMainPID = "no";
|
||||||
|
PIDFile = "/run/lock/netatalk";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 0755 -p /var/lib/netatalk/CNID";
|
||||||
|
ExecStart = "${pkgs.netatalk}/sbin/netatalk -F ${afpConfFile}";
|
||||||
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
ExecStop = "${pkgs.coreutils}/bin/kill -TERM $MAINPID";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.services.netatalk.unixAuth = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -79,6 +79,14 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
Whether to enable Samba, which provides file and print
|
Whether to enable Samba, which provides file and print
|
||||||
services to Windows clients through the SMB/CIFS protocol.
|
services to Windows clients through the SMB/CIFS protocol.
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>If you use the firewall consider adding the following:</para>
|
||||||
|
<programlisting>
|
||||||
|
networking.firewall.allowedTCPPorts = [ 139 445 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 137 138 ];
|
||||||
|
</programlisting>
|
||||||
|
</note>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -86,7 +94,7 @@ in
|
|||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.samba;
|
default = pkgs.samba;
|
||||||
defaultText = "pkgs.samba";
|
defaultText = "pkgs.samba";
|
||||||
example = literalExample "pkgs.samba4";
|
example = literalExample "pkgs.samba3";
|
||||||
description = ''
|
description = ''
|
||||||
Defines which package should be used for the samba server.
|
Defines which package should be used for the samba server.
|
||||||
'';
|
'';
|
||||||
@ -118,6 +126,10 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
Additional global section and extra section lines go in here.
|
Additional global section and extra section lines go in here.
|
||||||
'';
|
'';
|
||||||
|
example = ''
|
||||||
|
guest account = nobody
|
||||||
|
map to guest = bad user
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
configText = mkOption {
|
configText = mkOption {
|
||||||
@ -154,9 +166,11 @@ in
|
|||||||
'';
|
'';
|
||||||
type = types.attrsOf (types.attrsOf types.unspecified);
|
type = types.attrsOf (types.attrsOf types.unspecified);
|
||||||
example =
|
example =
|
||||||
{ srv =
|
{ public =
|
||||||
{ path = "/srv";
|
{ path = "/srv/public";
|
||||||
"read only" = true;
|
"read only" = true;
|
||||||
|
browseable = "yes";
|
||||||
|
"guest ok" = "yes";
|
||||||
comment = "Public samba share.";
|
comment = "Public samba share.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ rec {
|
|||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs.pythonPackages; [
|
environment.systemPackages = with pkgs.pythonPackages; [
|
||||||
python twisted pycrypto pyasn1 ];
|
python twisted_11 pycrypto pyasn1 ];
|
||||||
|
|
||||||
environment.etc."kippo.cfg".text = ''
|
environment.etc."kippo.cfg".text = ''
|
||||||
# Automatically generated by NixOS.
|
# Automatically generated by NixOS.
|
||||||
@ -84,7 +84,7 @@ rec {
|
|||||||
description = "Kippo Web Server";
|
description = "Kippo Web Server";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.PYTHONPATH = "${pkgs.kippo}/src/:${pkgs.pythonPackages.pycrypto}/lib/python2.7/site-packages/:${pkgs.pythonPackages.pyasn1}/lib/python2.7/site-packages/:${pkgs.pythonPackages.python}/lib/python2.7/site-packages/:${pkgs.pythonPackages.twisted}/lib/python2.7/site-packages/:.";
|
environment.PYTHONPATH = "${pkgs.kippo}/src/:${pkgs.pythonPackages.pycrypto}/lib/python2.7/site-packages/:${pkgs.pythonPackages.pyasn1}/lib/python2.7/site-packages/:${pkgs.pythonPackages.python}/lib/python2.7/site-packages/:${pkgs.pythonPackages.twisted_11}/lib/python2.7/site-packages/:.";
|
||||||
preStart = ''
|
preStart = ''
|
||||||
if [ ! -d ${cfg.varPath}/ ] ; then
|
if [ ! -d ${cfg.varPath}/ ] ; then
|
||||||
mkdir -p ${cfg.logPath}/tty
|
mkdir -p ${cfg.logPath}/tty
|
||||||
@ -107,7 +107,7 @@ rec {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig.ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n";
|
serviceConfig.ExecStart = "${pkgs.pythonPackages.twisted_11}/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n";
|
||||||
serviceConfig.PermissionsStartOnly = true;
|
serviceConfig.PermissionsStartOnly = true;
|
||||||
serviceConfig.User = "kippo";
|
serviceConfig.User = "kippo";
|
||||||
serviceConfig.Group = "kippo";
|
serviceConfig.Group = "kippo";
|
||||||
|
@ -228,6 +228,11 @@ in {
|
|||||||
users.extraUsers = [{
|
users.extraUsers = [{
|
||||||
name = "nm-openvpn";
|
name = "nm-openvpn";
|
||||||
uid = config.ids.uids.nm-openvpn;
|
uid = config.ids.uids.nm-openvpn;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# to enable link-local connections
|
||||||
|
name = "avahi-autoipd";
|
||||||
|
uid = config.ids.uids.avahi-autoipd;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
systemd.packages = cfg.packages;
|
systemd.packages = cfg.packages;
|
||||||
|
@ -304,7 +304,7 @@ in
|
|||||||
services.openssh.authorizedKeysFiles =
|
services.openssh.authorizedKeysFiles =
|
||||||
[ ".ssh/authorized_keys" ".ssh/authorized_keys2" "/etc/ssh/authorized_keys.d/%u" ];
|
[ ".ssh/authorized_keys" ".ssh/authorized_keys2" "/etc/ssh/authorized_keys.d/%u" ];
|
||||||
|
|
||||||
services.openssh.extraConfig =
|
services.openssh.extraConfig = mkOrder 0
|
||||||
''
|
''
|
||||||
PidFile /run/sshd.pid
|
PidFile /run/sshd.pid
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ in
|
|||||||
[ ! -e "/var/lib/cups/$i" ] && ln -s "${rootdir}/etc/cups/$i" "/var/lib/cups/$i"
|
[ ! -e "/var/lib/cups/$i" ] && ln -s "${rootdir}/etc/cups/$i" "/var/lib/cups/$i"
|
||||||
done
|
done
|
||||||
${optionalString cfg.gutenprint ''
|
${optionalString cfg.gutenprint ''
|
||||||
${gutenprint}/bin/cups-genppdupdate
|
${gutenprint}/bin/cups-genppdupdate -p /etc/cups/ppd
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -5,44 +5,86 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.uwsgi;
|
cfg = config.services.uwsgi;
|
||||||
|
|
||||||
python2Pkgs = pkgs.python2Packages.override {
|
|
||||||
python = pkgs.uwsgi.python2;
|
|
||||||
self = python2Pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
python3Pkgs = pkgs.python3Packages.override {
|
|
||||||
python = pkgs.uwsgi.python3;
|
|
||||||
self = python3Pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
buildCfg = c: if builtins.typeOf c != "set" then builtins.readFile c else builtins.toJSON {
|
|
||||||
uwsgi =
|
|
||||||
if c.type == "normal"
|
|
||||||
then {
|
|
||||||
pythonpath =
|
|
||||||
(if c ? python2Packages
|
|
||||||
then builtins.map (x: "${x}/${pkgs.uwsgi.python2.sitePackages}") (c.python2Packages python2Pkgs)
|
|
||||||
else [])
|
|
||||||
++ (if c ? python3Packages
|
|
||||||
then builtins.map (x: "${x}/${pkgs.uwsgi.python3.sitePackages}") (c.python3Packages python3Pkgs)
|
|
||||||
else []);
|
|
||||||
plugins = cfg.plugins;
|
|
||||||
} // removeAttrs c [ "type" "python2Packages" "python3Packages" ]
|
|
||||||
else if c.type == "emperor"
|
|
||||||
then {
|
|
||||||
emperor = if builtins.typeOf c.vassals != "set" then c.vassals
|
|
||||||
else pkgs.buildEnv {
|
|
||||||
name = "vassals";
|
|
||||||
paths = mapAttrsToList (n: c: pkgs.writeTextDir "${n}.json" (buildCfg c)) c.vassals;
|
|
||||||
};
|
|
||||||
} // removeAttrs c [ "type" "vassals" ]
|
|
||||||
else abort "type should be either 'normal' or 'emperor'";
|
|
||||||
};
|
|
||||||
|
|
||||||
uwsgi = pkgs.uwsgi.override {
|
uwsgi = pkgs.uwsgi.override {
|
||||||
plugins = cfg.plugins;
|
plugins = cfg.plugins;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildCfg = name: c:
|
||||||
|
let
|
||||||
|
plugins =
|
||||||
|
if any (n: !any (m: m == n) cfg.plugins) (c.plugins or [])
|
||||||
|
then throw "`plugins` attribute in UWSGI configuration contains plugins not in config.services.uwsgi.plugins"
|
||||||
|
else c.plugins or cfg.plugins;
|
||||||
|
|
||||||
|
hasPython = v: filter (n: n == "python${v}") plugins != [];
|
||||||
|
hasPython2 = hasPython "2";
|
||||||
|
hasPython3 = hasPython "3";
|
||||||
|
|
||||||
|
python =
|
||||||
|
if hasPython2 && hasPython3 then
|
||||||
|
throw "`plugins` attribute in UWSGI configuration shouldn't contain both python2 and python3"
|
||||||
|
else if hasPython2 then uwsgi.python2
|
||||||
|
else if hasPython3 then uwsgi.python3
|
||||||
|
else null;
|
||||||
|
|
||||||
|
pythonPackages = pkgs.pythonPackages.override {
|
||||||
|
inherit python;
|
||||||
|
self = pythonPackages;
|
||||||
|
};
|
||||||
|
|
||||||
|
json = builtins.toJSON {
|
||||||
|
uwsgi =
|
||||||
|
if c.type == "normal"
|
||||||
|
then {
|
||||||
|
inherit plugins;
|
||||||
|
} // removeAttrs c [ "type" "pythonPackages" ]
|
||||||
|
// optionalAttrs (python != null) {
|
||||||
|
pythonpath = "@PYTHONPATH@";
|
||||||
|
env = (c.env or {}) // {
|
||||||
|
PATH = optionalString (c ? env.PATH) "${c.env.PATH}:" + "@PATH@";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if c.type == "emperor"
|
||||||
|
then {
|
||||||
|
emperor = if builtins.typeOf c.vassals != "set" then c.vassals
|
||||||
|
else pkgs.buildEnv {
|
||||||
|
name = "vassals";
|
||||||
|
paths = mapAttrsToList buildCfg c.vassals;
|
||||||
|
};
|
||||||
|
} // removeAttrs c [ "type" "vassals" ]
|
||||||
|
else throw "`type` attribute in UWSGI configuration should be either 'normal' or 'emperor'";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
if python == null || c.type != "normal"
|
||||||
|
then pkgs.writeTextDir "${name}.json" json
|
||||||
|
else pkgs.stdenv.mkDerivation {
|
||||||
|
name = "uwsgi-config";
|
||||||
|
inherit json;
|
||||||
|
passAsFile = [ "json" ];
|
||||||
|
nativeBuildInputs = [ pythonPackages.wrapPython ];
|
||||||
|
pythonInputs = (c.pythonPackages or (self: [])) pythonPackages;
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir $out
|
||||||
|
declare -A pythonPathsSeen=()
|
||||||
|
program_PYTHONPATH=
|
||||||
|
program_PATH=
|
||||||
|
if [ -n "$pythonInputs" ]; then
|
||||||
|
for i in $pythonInputs; do
|
||||||
|
_addToPythonPath $i
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
# A hack to replace "@PYTHONPATH@" with a JSON list
|
||||||
|
if [ -n "$program_PYTHONPATH" ]; then
|
||||||
|
program_PYTHONPATH="\"''${program_PYTHONPATH//:/\",\"}\""
|
||||||
|
fi
|
||||||
|
substitute $jsonPath $out/${name}.json \
|
||||||
|
--replace '"@PYTHONPATH@"' "[$program_PYTHONPATH]" \
|
||||||
|
--subst-var-by PATH "$program_PATH"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
@ -71,21 +113,24 @@ in {
|
|||||||
vassals = {
|
vassals = {
|
||||||
moin = {
|
moin = {
|
||||||
type = "normal";
|
type = "normal";
|
||||||
python2Packages = self: with self; [ moinmoin ];
|
pythonPackages = self: with self; [ moinmoin ];
|
||||||
socket = "${config.services.uwsgi.runDir}/uwsgi.sock";
|
socket = "${config.services.uwsgi.runDir}/uwsgi.sock";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
uWSGI configuration. This awaits either a path to file or a set which will be made into one.
|
uWSGI configuration. It awaits an attribute <literal>type</literal> inside which can be either
|
||||||
If given a set, it awaits an attribute <literal>type</literal> which can be either <literal>normal</literal>
|
<literal>normal</literal> or <literal>emperor</literal>.
|
||||||
or <literal>emperor</literal>.
|
|
||||||
|
For <literal>normal</literal> mode you can specify <literal>pythonPackages</literal> as a function
|
||||||
|
from libraries set into a list of libraries. <literal>pythonpath</literal> will be set accordingly.
|
||||||
|
|
||||||
For <literal>normal</literal> mode you can specify <literal>python2Packages</literal> and
|
|
||||||
<literal>python3Packages</literal> as functions from libraries set into lists of libraries.
|
|
||||||
For <literal>emperor</literal> mode, you should use <literal>vassals</literal> attribute
|
For <literal>emperor</literal> mode, you should use <literal>vassals</literal> attribute
|
||||||
which should be either a set of names and configurations or a path to a directory.
|
which should be either a set of names and configurations or a path to a directory.
|
||||||
|
|
||||||
|
Other attributes will be used in configuration file as-is. Notice that you can redefine
|
||||||
|
<literal>plugins</literal> setting here.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -118,7 +163,7 @@ in {
|
|||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStart = "${uwsgi}/bin/uwsgi --uid ${cfg.user} --gid ${cfg.group} --json ${pkgs.writeText "uwsgi.json" (buildCfg cfg.instance)}";
|
ExecStart = "${uwsgi}/bin/uwsgi --uid ${cfg.user} --gid ${cfg.group} --json ${buildCfg "server" cfg.instance}/server.json";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
||||||
NotifyAccess = "main";
|
NotifyAccess = "main";
|
||||||
|
235
nixos/modules/services/x11/hardware/libinput.nix
Normal file
235
nixos/modules/services/x11/hardware/libinput.nix
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.services.xserver.libinput;
|
||||||
|
xorgBool = v: if v then "on" else "off";
|
||||||
|
in {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.xserver.libinput = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether to enable libinput support.";
|
||||||
|
};
|
||||||
|
|
||||||
|
dev = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
example = "/dev/input/event0";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Path for touchpad device. Set to null to apply to any
|
||||||
|
auto-detected touchpad.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
accelProfile = mkOption {
|
||||||
|
type = types.enum [ "flat" "adaptive" ];
|
||||||
|
default = "flat";
|
||||||
|
example = "adaptive";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Sets the pointer acceleration profile to the given profile. Permitted values are adaptive, flat.
|
||||||
|
Not all devices support this option or all profiles. If a profile is unsupported, the default profile
|
||||||
|
for this is used. For a description on the profiles and their behavior, see the libinput documentation.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
accelSpeed = mkOption {
|
||||||
|
type = types.nullOr types.string;
|
||||||
|
default = null;
|
||||||
|
description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
|
||||||
|
};
|
||||||
|
|
||||||
|
buttonMapping = mkOption {
|
||||||
|
type = types.nullOr types.string;
|
||||||
|
default = null;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Sets the logical button mapping for this device, see XSetPointerMapping(3). The string must
|
||||||
|
be a space-separated list of button mappings in the order of the logical buttons on the
|
||||||
|
device, starting with button 1. The default mapping is "1 2 3 ... 32". A mapping of 0 deac‐
|
||||||
|
tivates the button. Multiple buttons can have the same mapping. Invalid mapping strings are
|
||||||
|
discarded and the default mapping is used for all buttons. Buttons not specified in the
|
||||||
|
user's mapping use the default mapping. See section BUTTON MAPPING for more details.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
calibrationMatrix = mkOption {
|
||||||
|
type = types.nullOr types.string;
|
||||||
|
default = null;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
A string of 9 space-separated floating point numbers. Sets the calibration matrix to the
|
||||||
|
3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
clickMethod = mkOption {
|
||||||
|
type = types.nullOr (types.enum [ "none" "buttonareas" "clickfinger" ]);
|
||||||
|
default = null;
|
||||||
|
example = "none";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Enables a click method. Permitted values are none, buttonareas, clickfinger.
|
||||||
|
Not all devices support all methods, if an option is unsupported,
|
||||||
|
the default click method for this device is used.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
leftHanded = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Enables left-handed button orientation, i.e. swapping left and right buttons.";
|
||||||
|
};
|
||||||
|
|
||||||
|
middleEmulation = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Enables middle button emulation. When enabled, pressing the left and right buttons
|
||||||
|
simultaneously produces a middle mouse button click.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
naturalScrolling = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Enables or disables natural scrolling behavior.";
|
||||||
|
};
|
||||||
|
|
||||||
|
scrollButton = mkOption {
|
||||||
|
type = types.nullOr types.int;
|
||||||
|
default = null;
|
||||||
|
example = 1;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Designates a button as scroll button. If the ScrollMethod is button and the button is logically
|
||||||
|
held down, x/y axis movement is converted into scroll events.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
scrollMethod = mkOption {
|
||||||
|
type = types.enum [ "twofinger" "edge" "none" ];
|
||||||
|
default = "twofinger";
|
||||||
|
example = "edge";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Specify the scrolling method.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
horizontalScrolling = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Disables horizontal scrolling. When disabled, this driver will discard any horizontal scroll
|
||||||
|
events from libinput. Note that this does not disable horizontal scrolling, it merely
|
||||||
|
discards the horizontal axis from any scroll events.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
sendEventsMode = mkOption {
|
||||||
|
type = types.enum [ "disabled" "enabled" "disabled-on-external-mouse" ];
|
||||||
|
default = "enabled";
|
||||||
|
example = "disabled";
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Sets the send events mode to disabled, enabled, or "disable when an external mouse is connected".
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
tapping = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Enables or disables tap-to-click behavior.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
tappingDragLock = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-
|
||||||
|
and-drag will not immediately release the button. If the finger is set down again within the
|
||||||
|
timeout, the draging process continues.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
disableWhileTyping = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Disable input method while typing.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
additionalOptions = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
example =
|
||||||
|
''
|
||||||
|
Option "DragLockButtons" "L1 B1 L2 B2"
|
||||||
|
'';
|
||||||
|
description = "Additional options for libinput touchpad driver.";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
services.xserver.modules = [ pkgs.xorg.xf86inputlibinput ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.xorg.xf86inputlibinput ];
|
||||||
|
|
||||||
|
services.xserver.config =
|
||||||
|
''
|
||||||
|
# Automatically enable the libinput driver for all touchpads.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "libinputConfiguration"
|
||||||
|
MatchIsTouchpad "on"
|
||||||
|
${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
|
||||||
|
Driver "libinput"
|
||||||
|
Option "AccelProfile" "${cfg.accelProfile}"
|
||||||
|
${optionalString (cfg.accelSpeed != null) ''Option "AccelSpeed" "${cfg.accelSpeed}"''}
|
||||||
|
${optionalString (cfg.buttonMapping != null) ''Option "ButtonMapping" "${cfg.buttonMapping}"''}
|
||||||
|
${optionalString (cfg.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.calibrationMatrix}"''}
|
||||||
|
${optionalString (cfg.clickMethod != null) ''Option "ClickMethod" "${cfg.clickMethod}"''}
|
||||||
|
Option "LeftHanded" "${xorgBool cfg.leftHanded}"
|
||||||
|
Option "MiddleEmulation" "${xorgBool cfg.middleEmulation}"
|
||||||
|
Option "NaturalScrolling" "${xorgBool cfg.naturalScrolling}"
|
||||||
|
${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${cfg.scrollButton}"''}
|
||||||
|
Option "ScrollMethod" "${cfg.scrollMethod}"
|
||||||
|
Option "HorizontalScrolling" "${xorgBool cfg.horizontalScrolling}"
|
||||||
|
Option "SendEventsMode" "${cfg.sendEventsMode}"
|
||||||
|
Option "Tapping" "${xorgBool cfg.tapping}"
|
||||||
|
Option "TappingDragLock" "${xorgBool cfg.tappingDragLock}"
|
||||||
|
Option "DisableWhileTyping" "${xorgBool cfg.disableWhileTyping}"
|
||||||
|
${cfg.additionalOptions}
|
||||||
|
EndSection
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -8,7 +8,7 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
services.xserver.windowManager.openbox.enable = mkEnableOption "oroborus";
|
services.xserver.windowManager.openbox.enable = mkEnableOption "openbox";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -261,12 +261,12 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||||||
|
|
||||||
sub pathToUnitName {
|
sub pathToUnitName {
|
||||||
my ($path) = @_;
|
my ($path) = @_;
|
||||||
die unless substr($path, 0, 1) eq "/";
|
open my $cmd, "-|", "systemd-escape", "--suffix=mount", "-p", $path
|
||||||
return "-" if $path eq "/";
|
or die "Unable to escape $path!\n";
|
||||||
$path = substr($path, 1);
|
my $escaped = join "", <$cmd>;
|
||||||
$path =~ s/\//-/g;
|
chomp $escaped;
|
||||||
# FIXME: handle - and unprintable characters.
|
close $cmd or die;
|
||||||
return $path;
|
return $escaped;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub unique {
|
sub unique {
|
||||||
@ -290,7 +290,7 @@ my ($newFss, $newSwaps) = parseFstab "$out/etc/fstab";
|
|||||||
foreach my $mountPoint (keys %$prevFss) {
|
foreach my $mountPoint (keys %$prevFss) {
|
||||||
my $prev = $prevFss->{$mountPoint};
|
my $prev = $prevFss->{$mountPoint};
|
||||||
my $new = $newFss->{$mountPoint};
|
my $new = $newFss->{$mountPoint};
|
||||||
my $unit = pathToUnitName($mountPoint) . ".mount";
|
my $unit = pathToUnitName($mountPoint);
|
||||||
if (!defined $new) {
|
if (!defined $new) {
|
||||||
# Filesystem entry disappeared, so unmount it.
|
# Filesystem entry disappeared, so unmount it.
|
||||||
$unitsToStop{$unit} = 1;
|
$unitsToStop{$unit} = 1;
|
||||||
|
@ -71,6 +71,23 @@ mount -t devtmpfs -o "size=@devSize@" devtmpfs /dev
|
|||||||
mkdir -p /run
|
mkdir -p /run
|
||||||
mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
|
mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
|
||||||
|
|
||||||
|
# Log the script output to /dev/kmsg or /run/log/stage-1-init.log.
|
||||||
|
mkdir -p /tmp
|
||||||
|
mkfifo /tmp/stage-1-init.log.fifo
|
||||||
|
logOutFd=8 && logErrFd=9
|
||||||
|
eval "exec $logOutFd>&1 $logErrFd>&2"
|
||||||
|
if test -w /dev/kmsg; then
|
||||||
|
tee -i < /tmp/stage-1-init.log.fifo /proc/self/fd/"$logOutFd" | while read -r line; do
|
||||||
|
if test -n "$line"; then
|
||||||
|
echo "<7>stage-1-init: $line" > /dev/kmsg
|
||||||
|
fi
|
||||||
|
done &
|
||||||
|
else
|
||||||
|
mkdir -p /run/log
|
||||||
|
tee -i < /tmp/stage-1-init.log.fifo /run/log/stage-1-init.log &
|
||||||
|
fi
|
||||||
|
exec > /tmp/stage-1-init.log.fifo 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Process the kernel command line.
|
# Process the kernel command line.
|
||||||
export stage2Init=/init
|
export stage2Init=/init
|
||||||
@ -415,6 +432,14 @@ fi
|
|||||||
# Stop udevd.
|
# Stop udevd.
|
||||||
udevadm control --exit
|
udevadm control --exit
|
||||||
|
|
||||||
|
# Reset the logging file descriptors.
|
||||||
|
# Do this just before pkill, which will kill the tee process.
|
||||||
|
if test -n "@logCommands@"
|
||||||
|
then
|
||||||
|
exec 1>&$logOutFd 2>&$logErrFd
|
||||||
|
eval "exec $logOutFd>&- $logErrFd>&-"
|
||||||
|
fi
|
||||||
|
|
||||||
# Kill any remaining processes, just to be sure we're not taking any
|
# Kill any remaining processes, just to be sure we're not taking any
|
||||||
# with us into stage 2. But keep storage daemons like unionfs-fuse.
|
# with us into stage 2. But keep storage daemons like unionfs-fuse.
|
||||||
pkill -9 -v -f '@'
|
pkill -9 -v -f '@'
|
||||||
|
@ -155,6 +155,21 @@ mkdir -m 0755 -p /var/setuid-wrappers
|
|||||||
mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
|
mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
|
||||||
|
|
||||||
|
|
||||||
|
# Log the script output to /dev/kmsg or /run/log/stage-2-init.log.
|
||||||
|
# Only at this point are all the necessary prerequisites ready for these commands.
|
||||||
|
exec {logOutFd}>&1 {logErrFd}>&2
|
||||||
|
if test -w /dev/kmsg; then
|
||||||
|
exec > >(tee -i /proc/self/fd/"$logOutFd" | while read -r line; do
|
||||||
|
if test -n "$line"; then
|
||||||
|
echo "<7>stage-2-init: $line" > /dev/kmsg
|
||||||
|
fi
|
||||||
|
done) 2>&1
|
||||||
|
else
|
||||||
|
mkdir -p /run/log
|
||||||
|
exec > >(tee -i /run/log/stage-2-init.log) 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Run the script that performs all configuration activation that does
|
# Run the script that performs all configuration activation that does
|
||||||
# not have to be done at boot time.
|
# not have to be done at boot time.
|
||||||
echo "running activation script..."
|
echo "running activation script..."
|
||||||
@ -182,6 +197,11 @@ ln -sfn /run/booted-system /nix/var/nix/gcroots/booted-system
|
|||||||
@shell@ @postBootCommands@
|
@shell@ @postBootCommands@
|
||||||
|
|
||||||
|
|
||||||
|
# Reset the logging file descriptors.
|
||||||
|
exec 1>&$logOutFd 2>&$logErrFd
|
||||||
|
exec {logOutFd}>&- {logErrFd}>&-
|
||||||
|
|
||||||
|
|
||||||
# Start systemd.
|
# Start systemd.
|
||||||
echo "starting systemd..."
|
echo "starting systemd..."
|
||||||
PATH=/run/current-system/systemd/lib/systemd \
|
PATH=/run/current-system/systemd/lib/systemd \
|
||||||
|
@ -20,7 +20,15 @@ let kernel = config.boot.kernelPackages.kernel; in
|
|||||||
export USER=root
|
export USER=root
|
||||||
export HOME=/root
|
export HOME=/root
|
||||||
export DISPLAY=:0.0
|
export DISPLAY=:0.0
|
||||||
|
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
|
|
||||||
|
# Don't use a pager when executing backdoor
|
||||||
|
# actions. Because we use a tty, commands like systemctl
|
||||||
|
# or nix-store get confused into thinking they're running
|
||||||
|
# interactively.
|
||||||
|
export PAGER=
|
||||||
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
exec < /dev/hvc0 > /dev/hvc0
|
exec < /dev/hvc0 > /dev/hvc0
|
||||||
while ! exec 2> /dev/ttyS0; do sleep 0.1; done
|
while ! exec 2> /dev/ttyS0; do sleep 0.1; done
|
||||||
@ -38,11 +46,6 @@ let kernel = config.boot.kernelPackages.kernel; in
|
|||||||
systemd.services."serial-getty@ttyS0".enable = false;
|
systemd.services."serial-getty@ttyS0".enable = false;
|
||||||
systemd.services."serial-getty@hvc0".enable = false;
|
systemd.services."serial-getty@hvc0".enable = false;
|
||||||
|
|
||||||
# Don't use a pager when executing backdoor actions. Because we
|
|
||||||
# use a tty, commands like systemctl or nix-store get confused
|
|
||||||
# into thinking they're running interactively.
|
|
||||||
environment.variables.PAGER = "";
|
|
||||||
|
|
||||||
boot.initrd.preDeviceCommands =
|
boot.initrd.preDeviceCommands =
|
||||||
''
|
''
|
||||||
echo 600 > /proc/sys/kernel/hung_task_timeout_secs
|
echo 600 > /proc/sys/kernel/hung_task_timeout_secs
|
||||||
|
@ -9,10 +9,10 @@ let
|
|||||||
waagent = with pkgs; stdenv.mkDerivation rec {
|
waagent = with pkgs; stdenv.mkDerivation rec {
|
||||||
name = "waagent-2.0";
|
name = "waagent-2.0";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "phreedom";
|
owner = "Azure";
|
||||||
repo = "WALinuxAgent";
|
repo = "WALinuxAgent";
|
||||||
rev = "1d31fe8cbc7f842993eed9b33a3d3f5410c364e3";
|
rev = "1b3a8407a95344d9d12a2a377f64140975f1e8e4";
|
||||||
sha256 = "1s53pfmy3azp0rmympmnphyq96sr9jy07pbsfza6mdzpalx1ripl";
|
sha256 = "10byzvmpgrmr4d5mdn2kq04aapqb3sgr1admk13wjmy5cd6bwd2x";
|
||||||
};
|
};
|
||||||
buildInputs = [ makeWrapper python pythonPackages.wrapPython ];
|
buildInputs = [ makeWrapper python pythonPackages.wrapPython ];
|
||||||
runtimeDeps = [ findutils gnugrep gawk coreutils openssl openssh
|
runtimeDeps = [ findutils gnugrep gawk coreutils openssl openssh
|
||||||
|
@ -16,14 +16,14 @@ in
|
|||||||
cyl=$(((${diskSize}*1024*1024)/(512*63*255)))
|
cyl=$(((${diskSize}*1024*1024)/(512*63*255)))
|
||||||
size=$(($cyl*255*63*512))
|
size=$(($cyl*255*63*512))
|
||||||
roundedsize=$((($size/(1024*1024)+1)*(1024*1024)))
|
roundedsize=$((($size/(1024*1024)+1)*(1024*1024)))
|
||||||
${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage $roundedsize
|
${pkgs.vmTools.qemu-220}/bin/qemu-img create -f raw $diskImage $roundedsize
|
||||||
mv closure xchg/
|
mv closure xchg/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postVM =
|
postVM =
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc -o subformat=fixed $diskImage $out/disk.vhd
|
${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -O vpc -o subformat=fixed $diskImage $out/disk.vhd
|
||||||
rm $diskImage
|
rm $diskImage
|
||||||
'';
|
'';
|
||||||
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";
|
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index d6b9dc1..ce7c493 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -384,8 +384,7 @@ install-confdir:
|
||||||
|
install-sysconfig: install-datadir install-confdir
|
||||||
|
$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
|
||||||
|
|
||||||
|
-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
|
||||||
|
-install-datadir install-localstatedir
|
||||||
|
+install: all $(if $(BUILD_DOCS),install-doc) install-datadir
|
||||||
|
ifneq ($(TOOLS),)
|
||||||
|
$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
|
||||||
|
endif
|
@ -43,18 +43,20 @@ with lib;
|
|||||||
|
|
||||||
mkdir -m 0755 -p /etc/ssh
|
mkdir -m 0755 -p /etc/ssh
|
||||||
|
|
||||||
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' $userData)"
|
if [ -s "$userData" ]; then
|
||||||
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' $userData)"
|
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' $userData)"
|
||||||
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then
|
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' $userData)"
|
||||||
(umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key)
|
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then
|
||||||
echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub
|
(umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key)
|
||||||
fi
|
echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub
|
||||||
|
fi
|
||||||
|
|
||||||
key="$(sed 's/|/\n/g; s/SSH_HOST_ED25519_KEY://; t; d' $userData)"
|
key="$(sed 's/|/\n/g; s/SSH_HOST_ED25519_KEY://; t; d' $userData)"
|
||||||
key_pub="$(sed 's/SSH_HOST_ED25519_KEY_PUB://; t; d' $userData)"
|
key_pub="$(sed 's/SSH_HOST_ED25519_KEY_PUB://; t; d' $userData)"
|
||||||
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
||||||
(umask 077; echo "$key" > /etc/ssh/ssh_host_ed25519_key)
|
(umask 077; echo "$key" > /etc/ssh/ssh_host_ed25519_key)
|
||||||
echo "$key_pub" > /etc/ssh/ssh_host_ed25519_key.pub
|
echo "$key_pub" > /etc/ssh/ssh_host_ed25519_key.pub
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
# (showing that the right filters have been applied). Of
|
# (showing that the right filters have been applied). Of
|
||||||
# course, since there is no actual USB printer attached, the
|
# course, since there is no actual USB printer attached, the
|
||||||
# file will stay in the queue forever.
|
# file will stay in the queue forever.
|
||||||
$server->waitForFile("/var/spool/cups/d00001-001");
|
$server->waitForFile("/var/spool/cups/d*-001");
|
||||||
$server->sleep(10);
|
$server->sleep(10);
|
||||||
$server->succeed("lpq -a") =~ /$fn/ or die;
|
$server->succeed("lpq -a") =~ /$fn/ or die;
|
||||||
|
|
||||||
@ -90,6 +90,9 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
Machine::retry sub {
|
Machine::retry sub {
|
||||||
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
||||||
};
|
};
|
||||||
|
# The queue is empty already, so this should be safe.
|
||||||
|
# Otherwise, pairs of "c*"-"d*-001" files might persist.
|
||||||
|
$server->execute("rm /var/spool/cups/*");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost
|
{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost
|
||||||
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode
|
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
|
||||||
, withGui }:
|
, withGui }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec{
|
stdenv.mkDerivation rec{
|
||||||
|
|
||||||
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||||
core_version = "0.11.0";
|
core_version = "0.12.0";
|
||||||
version = core_version;
|
version = core_version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
urls = [ "https://bitcoin.org/bin/bitcoin-core-${core_version}/bitcoin-${version}.tar.gz"
|
urls = [ "https://bitcoin.org/bin/bitcoin-core-${core_version}/bitcoin-${version}.tar.gz"
|
||||||
"mirror://sourceforge/bitcoin/Bitcoin/bitcoin-${core_version}/bitcoin-${version}.tar.gz"
|
"mirror://sourceforge/bitcoin/Bitcoin/bitcoin-${core_version}/bitcoin-${version}.tar.gz"
|
||||||
];
|
];
|
||||||
sha256 = "51ba1756addfa71567559e3f22331c1d908a63571891287689fff7113035d09f";
|
sha256 = "0f1cda66c841a548a07cc37e80b0727354b1236d9f374c7d44362acdb85eb3e1";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig autoreconfHook openssl db48 boost zlib
|
buildInputs = [ pkgconfig autoreconfHook openssl db48 boost zlib
|
||||||
miniupnpc protobuf ]
|
miniupnpc protobuf libevent]
|
||||||
++ optionals stdenv.isLinux [ utillinux ]
|
++ optionals stdenv.isLinux [ utillinux ]
|
||||||
++ optionals withGui [ qt4 qrencode ];
|
++ optionals withGui [ qt4 qrencode ];
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, mygpoclient, intltool
|
{ stdenv, fetchurl, buildPythonApplication, pythonPackages, mygpoclient, intltool
|
||||||
, ipodSupport ? true, libgpod
|
, ipodSupport ? true, libgpod
|
||||||
, gnome3
|
, gnome3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
name = "gpodder-${version}";
|
name = "gpodder-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, gettext, klick}:
|
{ stdenv, fetchurl, pythonPackages, gettext, klick}:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "gtklick-${version}";
|
name = "gtklick-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
version = "0.6.4";
|
version = "0.6.4";
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ stdenv, fetchgit, xorg, freetype, alsaLib, libjack2
|
{ stdenv, fetchurl, xorg, freetype, alsaLib, libjack2
|
||||||
, lv2, pkgconfig, mesa }:
|
, lv2, pkgconfig, mesa }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "helm-git-2015-09-11";
|
version = "0.6.1";
|
||||||
|
name = "helm-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/mtytel/helm/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "18d7zx6r7har47zj6x1f2z91x796mxnix7w3x1yilmqnyqc56r3w";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/mtytel/helm.git";
|
|
||||||
rev = "ad798d4a0a2e7db52e1a7451176ff198a393cdb4";
|
|
||||||
sha256 = "0ic4xjikq7s2p53507ykv89844j6sqcd9mh3y59a6wnslr5wq1cw";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
|
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages }:
|
{ stdenv, fetchurl, pythonPackages }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "lastfmsubmitd-${version}";
|
name = "lastfmsubmitd-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
version = "1.0.6";
|
version = "1.0.6";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchgit, pythonPackages }:
|
{ stdenv, fetchgit, pythonPackages }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "lastwatch-${version}";
|
name = "lastwatch-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
version = "0.4.1";
|
version = "0.4.1";
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
{ stdenv, fetchurl, SDL, alsaLib, cmake, fftwSinglePrec, fluidsynth
|
{ stdenv, fetchFromGitHub, SDL, alsaLib, cmake, fftwSinglePrec, fluidsynth
|
||||||
, fltk13, libjack2, libvorbis , libsamplerate, libsndfile, pkgconfig
|
, fltk13, libjack2, libvorbis , libsamplerate, libsndfile, pkgconfig
|
||||||
, libpulseaudio, qt4, freetype
|
, libpulseaudio, qt4, freetype, libgig
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lmms-${version}";
|
name = "lmms-${version}";
|
||||||
version = "1.1.3";
|
version = "1.1.90";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/LMMS/lmms/archive/v${version}.tar.gz";
|
owner = "LMMS";
|
||||||
sha256 = "1g76z7ha3hd53vbqaq9n1qg6s3lw8zzaw51iny6y2bz0j1xqwcsr";
|
repo = "lmms";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0njiarndwqamqiinr1wbwkzjn87yzr1z5k9cfwk0jdkbalgakkq3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL alsaLib cmake fftwSinglePrec fltk13 fluidsynth libjack2
|
SDL alsaLib cmake fftwSinglePrec fltk13 fluidsynth libjack2 libgig
|
||||||
libsamplerate libsndfile libvorbis pkgconfig libpulseaudio qt4
|
libsamplerate libsndfile libvorbis pkgconfig libpulseaudio qt4
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let version = "3.2";
|
let version = "3.2";
|
||||||
in
|
in
|
||||||
pythonPackages.buildPythonPackage {
|
pythonPackages.buildPythonApplication {
|
||||||
name = "mimms-${version}";
|
name = "mimms-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.savannah.gnu.org/releases/mimms/mimms-${version}.tar.bz2";
|
url = "http://download.savannah.gnu.org/releases/mimms/mimms-${version}.tar.bz2";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-gmusic-${version}";
|
name = "mopidy-gmusic-${version}";
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-moped-${version}";
|
name = "mopidy-moped-${version}";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-mopify-${version}";
|
name = "mopidy-mopify-${version}";
|
||||||
|
|
||||||
version = "1.5.8";
|
version = "1.5.8";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-musicbox-webclient-${version}";
|
name = "mopidy-musicbox-webclient-${version}";
|
||||||
|
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-soundcloud-${version}";
|
name = "mopidy-soundcloud-${version}";
|
||||||
|
|
||||||
version = "2.0.2";
|
version = "2.0.2";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, pythonPackages, mopidy, mopidy-spotify }:
|
{ stdenv, fetchFromGitHub, pythonPackages, mopidy, mopidy-spotify }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-spotify-tunigo-${version}";
|
name = "mopidy-spotify-tunigo-${version}";
|
||||||
|
|
||||||
version = "0.2.1";
|
version = "0.2.1";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
{ stdenv, fetchurl, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-spotify-${version}";
|
name = "mopidy-spotify-${version}";
|
||||||
version = "2.3.1";
|
version = "2.3.1";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-youtube-${version}";
|
name = "mopidy-youtube-${version}";
|
||||||
|
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, glib_networking, gst_plugins_good, gst_plugins_base, gst_plugins_ugly
|
, glib_networking, gst_plugins_good, gst_plugins_base, gst_plugins_ugly
|
||||||
}:
|
}:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "mopidy-${version}";
|
name = "mopidy-${version}";
|
||||||
|
|
||||||
version = "1.1.2";
|
version = "1.1.2";
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchurl, gettext
|
{ stdenv, buildPythonApplication, fetchurl, gettext
|
||||||
, pkgconfig, libofa, ffmpeg, chromaprint
|
, pkgconfig, libofa, ffmpeg, chromaprint
|
||||||
, pyqt4, mutagen, python-libdiscid
|
, pyqt4, mutagen, python-libdiscid
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let version = "1.3.2"; in
|
let version = "1.3.2"; in
|
||||||
buildPythonPackage {
|
buildPythonApplication {
|
||||||
name = "picard-${version}";
|
name = "picard-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ fetchFromGitHub, stdenv, pythonPackages, gtk3, gobjectIntrospection, libnotify
|
{ fetchFromGitHub, stdenv, pythonPackages, gtk3, gobjectIntrospection, libnotify
|
||||||
, gst_all_1, wrapGAppsHook }:
|
, gst_all_1, wrapGAppsHook }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
pname = "pithos";
|
pname = "pithos";
|
||||||
version = "1.1.2";
|
version = "1.1.2";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject, intltool
|
{ stdenv, fetchurl, python, buildPythonApplication, mutagen, pygtk, pygobject, intltool
|
||||||
, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null
|
, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null
|
||||||
, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
|
, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ assert withGstPlugins -> gst_plugins_base != null
|
|||||||
|
|
||||||
let version = "2.6.3"; in
|
let version = "2.6.3"; in
|
||||||
|
|
||||||
buildPythonPackage {
|
buildPythonApplication {
|
||||||
# call the package quodlibet and just quodlibet
|
# call the package quodlibet and just quodlibet
|
||||||
name = "quodlibet-${version}"
|
name = "quodlibet-${version}"
|
||||||
+ stdenv.lib.optionalString withGstPlugins "-with-gst-plugins";
|
+ stdenv.lib.optionalString withGstPlugins "-with-gst-plugins";
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ pkgs, stdenv, fetchFromGitHub, pkgconfig, intltool, wrapGAppsHook,
|
{ pkgs, stdenv, fetchFromGitHub, pkgconfig, intltool, wrapGAppsHook,
|
||||||
python, buildPythonPackage, isPy3k,
|
python, buildPythonApplication, isPy3k,
|
||||||
gnome3, gtk3, gobjectIntrospection,
|
gnome3, gtk3, gobjectIntrospection,
|
||||||
dbus, pygobject3, mpd2 }:
|
dbus, pygobject3, mpd2 }:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
name = "sonata-${version}";
|
name = "sonata-${version}";
|
||||||
version = "1.7b1";
|
version = "1.7b1";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
@ -233,6 +233,8 @@ rec {
|
|||||||
|
|
||||||
srcs = [ srcFeature srcPlugin1 srcPlugin2 ];
|
srcs = [ srcFeature srcPlugin1 srcPlugin2 ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ zest ];
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -240,7 +242,8 @@ rec {
|
|||||||
mkdir -p $dropinDir/features
|
mkdir -p $dropinDir/features
|
||||||
unzip ${srcFeature} -d $dropinDir/features/
|
unzip ${srcFeature} -d $dropinDir/features/
|
||||||
mkdir -p $dropinDir/plugins
|
mkdir -p $dropinDir/plugins
|
||||||
cp -v ${srcPlugin1} ${srcPlugin2} $dropinDir/plugins/
|
cp -v ${srcPlugin1} $dropinDir/plugins/''${srcPlugin1#*-}
|
||||||
|
cp -v ${srcPlugin2} $dropinDir/plugins/''${srcPlugin2#*-}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -395,4 +398,21 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zest = buildEclipseUpdateSite rec {
|
||||||
|
name = "zest-${version}";
|
||||||
|
version = "3.9.101";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://archive.eclipse.org/tools/gef/downloads/drops/${version}/R201408150207/GEF-${name}.zip";
|
||||||
|
sha256 = "01scn7cmcrjcp387spjm8ifgwrwwi77ypildandbisfvhj3qqs7m";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://www.eclipse.org/gef/zest/;
|
||||||
|
description = "The Eclipse Visualization Toolkit";
|
||||||
|
platforms = platforms.all;
|
||||||
|
maintainers = [ maintainers.romildo ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{ stdenv, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
|
{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
|
||||||
, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
||||||
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
||||||
, alsaLib, cairo, acl, gpm, AppKit, CoreWLAN, Kerberos, GSS, ImageIO
|
, alsaLib, cairo, acl, gpm, AppKit, CoreWLAN, Kerberos, GSS, ImageIO
|
||||||
, withX ? !stdenv.isDarwin
|
, withX ? !stdenv.isDarwin
|
||||||
, withGTK3 ? false, gtk3 ? null
|
, withGTK3 ? false, gtk3 ? null
|
||||||
, withGTK2 ? true, gtk2
|
, withGTK2 ? true, gtk2
|
||||||
|
, enableTTYTrueColor ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (libXft != null) -> libpng != null; # probably a bug
|
assert (libXft != null) -> libpng != null; # probably a bug
|
||||||
@ -31,8 +32,14 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx";
|
sha256 = "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = stdenv.lib.optionals stdenv.isDarwin [
|
patches = lib.optionals stdenv.isDarwin [
|
||||||
./at-fdcwd.patch
|
./at-fdcwd.patch
|
||||||
|
] ++ lib.optionals enableTTYTrueColor [
|
||||||
|
# Modified TTY True Color patch from: https://gist.github.com/choppsv1/36aacdd696d505566088
|
||||||
|
# To use, pass --color=true-color, which will default to using ';'
|
||||||
|
# as the separator.
|
||||||
|
# Alternatively, set $EMACS_TRUE_COLOR_SEPARATOR to ';' or ':'.
|
||||||
|
./tty-true-color.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -79,9 +86,6 @@ stdenv.mkDerivation rec {
|
|||||||
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny jwiegley ];
|
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny jwiegley ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
||||||
# So that Exuberant ctags is preferred
|
|
||||||
priority = 1;
|
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
GNU Emacs is an extensible, customizable text editor—and more. At its
|
GNU Emacs is an extensible, customizable text editor—and more. At its
|
||||||
core is an interpreter for Emacs Lisp, a dialect of the Lisp
|
core is an interpreter for Emacs Lisp, a dialect of the Lisp
|
||||||
|
428
pkgs/applications/editors/emacs-24/tty-true-color.patch
Normal file
428
pkgs/applications/editors/emacs-24/tty-true-color.patch
Normal file
@ -0,0 +1,428 @@
|
|||||||
|
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
|
||||||
|
index 98108ce..21814a9 100644
|
||||||
|
--- a/lisp/term/tty-colors.el
|
||||||
|
+++ b/lisp/term/tty-colors.el
|
||||||
|
@@ -764,7 +764,8 @@
|
||||||
|
(auto . 0)
|
||||||
|
(ansi8 . 8)
|
||||||
|
(always . 8)
|
||||||
|
- (yes . 8))
|
||||||
|
+ (yes . 8)
|
||||||
|
+ (true-color . 16777216))
|
||||||
|
"An alist of supported standard tty color modes and their aliases.")
|
||||||
|
|
||||||
|
(defun tty-color-alist (&optional _frame)
|
||||||
|
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
|
||||||
|
index c673749..244cf7f 100644
|
||||||
|
--- a/lisp/term/xterm.el
|
||||||
|
+++ b/lisp/term/xterm.el
|
||||||
|
@@ -674,6 +674,15 @@ versions of xterm."
|
||||||
|
;; are more colors to support, compute them now.
|
||||||
|
(when (> ncolors 0)
|
||||||
|
(cond
|
||||||
|
+ ((= (display-color-cells (selected-frame)) 16777216) ; 24-bit xterm
|
||||||
|
+ (let ((idx (length xterm-standard-colors)))
|
||||||
|
+ ;; Insert standard X colors after the standard xterm ones
|
||||||
|
+ (mapc (lambda (color)
|
||||||
|
+ (if (not (assoc (car color) xterm-standard-colors))
|
||||||
|
+ (progn
|
||||||
|
+ (tty-color-define (car color) idx (cdr color))
|
||||||
|
+ (setq idx (1+ idx)))))
|
||||||
|
+ color-name-rgb-alist)))
|
||||||
|
((= ncolors 240) ; 256-color xterm
|
||||||
|
;; 216 non-gray colors first
|
||||||
|
(let ((r 0) (g 0) (b 0))
|
||||||
|
diff --git a/src/dispextern.h b/src/dispextern.h
|
||||||
|
index 239c442..5760b84 100644
|
||||||
|
--- a/src/dispextern.h
|
||||||
|
+++ b/src/dispextern.h
|
||||||
|
@@ -1739,9 +1739,15 @@ struct face
|
||||||
|
INLINE bool
|
||||||
|
face_tty_specified_color (unsigned long color)
|
||||||
|
{
|
||||||
|
- return color < FACE_TTY_DEFAULT_BG_COLOR;
|
||||||
|
+ return (color < FACE_TTY_DEFAULT_BG_COLOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
+INLINE bool
|
||||||
|
+face_tty_specified_24_bit_color (unsigned long color)
|
||||||
|
+{
|
||||||
|
+ /* 24 bit colors have 24th but not 25th bit set */
|
||||||
|
+ return ((color & (0x03 << 24)) == (0x01 << 24));
|
||||||
|
+}
|
||||||
|
/* Non-zero if FACE was realized for unibyte use. */
|
||||||
|
|
||||||
|
#define FACE_UNIBYTE_P(FACE) ((FACE)->charset < 0)
|
||||||
|
diff --git a/src/term.c b/src/term.c
|
||||||
|
index 8312491..b14aded 100644
|
||||||
|
--- a/src/term.c
|
||||||
|
+++ b/src/term.c
|
||||||
|
@@ -1915,18 +1915,40 @@ turn_on_face (struct frame *f, int face_id)
|
||||||
|
const char *ts;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
- ts = tty->standout_mode ? tty->TS_set_background : tty->TS_set_foreground;
|
||||||
|
+ if (face_tty_specified_24_bit_color(fg))
|
||||||
|
+ ts = tty->standout_mode ? tty->TS_set_rgb_background : tty->TS_set_rgb_foreground;
|
||||||
|
+ else
|
||||||
|
+ ts = tty->standout_mode ? tty->TS_set_background : tty->TS_set_foreground;
|
||||||
|
if (face_tty_specified_color (fg) && ts)
|
||||||
|
{
|
||||||
|
- p = tparam (ts, NULL, 0, fg, 0, 0, 0);
|
||||||
|
+ if (!face_tty_specified_24_bit_color(fg))
|
||||||
|
+ p = tparam (ts, NULL, 0, fg, 0, 0, 0);
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ const unsigned char r = (fg >> 16) & 0xFF,
|
||||||
|
+ g = (fg >> 8) & 0xFF,
|
||||||
|
+ b = fg & 0xFF;
|
||||||
|
+ p = tparam (ts, NULL, 0, (int)r, (int)g, (int)b, 0);
|
||||||
|
+ }
|
||||||
|
OUTPUT (tty, p);
|
||||||
|
xfree (p);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ts = tty->standout_mode ? tty->TS_set_foreground : tty->TS_set_background;
|
||||||
|
+ if (face_tty_specified_24_bit_color(bg))
|
||||||
|
+ ts = tty->standout_mode ? tty->TS_set_rgb_foreground : tty->TS_set_rgb_background;
|
||||||
|
+ else
|
||||||
|
+ ts = tty->standout_mode ? tty->TS_set_foreground : tty->TS_set_background;
|
||||||
|
if (face_tty_specified_color (bg) && ts)
|
||||||
|
{
|
||||||
|
- p = tparam (ts, NULL, 0, bg, 0, 0, 0);
|
||||||
|
+ if (!face_tty_specified_24_bit_color(bg))
|
||||||
|
+ p = tparam (ts, NULL, 0, bg, 0, 0, 0);
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ const unsigned char r = (bg >> 16) & 0xFF,
|
||||||
|
+ g = (bg >> 8) & 0xFF,
|
||||||
|
+ b = bg & 0xFF;
|
||||||
|
+ p = tparam (ts, NULL, 0, (int)r, (int)g, (int)b, 0);
|
||||||
|
+ }
|
||||||
|
OUTPUT (tty, p);
|
||||||
|
xfree (p);
|
||||||
|
}
|
||||||
|
@@ -2028,6 +2050,8 @@ TERMINAL does not refer to a text terminal. */)
|
||||||
|
struct terminal *t = get_tty_terminal (terminal, 0);
|
||||||
|
if (!t)
|
||||||
|
return make_number (0);
|
||||||
|
+ else if (t->display_info.tty->TS_set_rgb_foreground)
|
||||||
|
+ return make_number (16777216); /* 24 bit True Color */
|
||||||
|
else
|
||||||
|
return make_number (t->display_info.tty->TN_max_colors);
|
||||||
|
}
|
||||||
|
@@ -2043,6 +2067,8 @@ static int default_no_color_video;
|
||||||
|
static char *default_orig_pair;
|
||||||
|
static char *default_set_foreground;
|
||||||
|
static char *default_set_background;
|
||||||
|
+static char *default_set_rgb_foreground;
|
||||||
|
+static char *default_set_rgb_background;
|
||||||
|
|
||||||
|
/* Save or restore the default color-related capabilities of this
|
||||||
|
terminal. */
|
||||||
|
@@ -2055,6 +2081,8 @@ tty_default_color_capabilities (struct tty_display_info *tty, bool save)
|
||||||
|
dupstring (&default_orig_pair, tty->TS_orig_pair);
|
||||||
|
dupstring (&default_set_foreground, tty->TS_set_foreground);
|
||||||
|
dupstring (&default_set_background, tty->TS_set_background);
|
||||||
|
+ dupstring (&default_set_rgb_foreground, tty->TS_set_rgb_foreground);
|
||||||
|
+ dupstring (&default_set_rgb_background, tty->TS_set_rgb_background);
|
||||||
|
default_max_colors = tty->TN_max_colors;
|
||||||
|
default_max_pairs = tty->TN_max_pairs;
|
||||||
|
default_no_color_video = tty->TN_no_color_video;
|
||||||
|
@@ -2064,6 +2092,8 @@ tty_default_color_capabilities (struct tty_display_info *tty, bool save)
|
||||||
|
tty->TS_orig_pair = default_orig_pair;
|
||||||
|
tty->TS_set_foreground = default_set_foreground;
|
||||||
|
tty->TS_set_background = default_set_background;
|
||||||
|
+ tty->TS_set_rgb_foreground = default_set_rgb_foreground;
|
||||||
|
+ tty->TS_set_rgb_background = default_set_rgb_background;
|
||||||
|
tty->TN_max_colors = default_max_colors;
|
||||||
|
tty->TN_max_pairs = default_max_pairs;
|
||||||
|
tty->TN_no_color_video = default_no_color_video;
|
||||||
|
@@ -2088,6 +2118,7 @@ tty_setup_colors (struct tty_display_info *tty, int mode)
|
||||||
|
tty->TN_max_pairs = 0;
|
||||||
|
tty->TN_no_color_video = 0;
|
||||||
|
tty->TS_set_foreground = tty->TS_set_background = tty->TS_orig_pair = NULL;
|
||||||
|
+ tty->TS_set_rgb_foreground = tty->TS_set_rgb_background = NULL;
|
||||||
|
break;
|
||||||
|
case 0: /* default colors, if any */
|
||||||
|
default:
|
||||||
|
@@ -2102,10 +2133,45 @@ tty_setup_colors (struct tty_display_info *tty, int mode)
|
||||||
|
tty->TS_set_foreground = "\033[3%dm";
|
||||||
|
tty->TS_set_background = "\033[4%dm";
|
||||||
|
#endif
|
||||||
|
+ tty->TS_set_rgb_foreground = NULL;
|
||||||
|
+ tty->TS_set_rgb_background = NULL;
|
||||||
|
tty->TN_max_colors = 8;
|
||||||
|
tty->TN_max_pairs = 64;
|
||||||
|
tty->TN_no_color_video = 0;
|
||||||
|
break;
|
||||||
|
+ case 16777216: /* RGB colors */
|
||||||
|
+ tty->TS_orig_pair = "\033[0m";
|
||||||
|
+
|
||||||
|
+ /* if the user hasn't explicitly chosen the ":" separator, use ";". */
|
||||||
|
+ char * true_color_separator = getenv ("EMACS_TRUE_COLOR_SEPARATOR");
|
||||||
|
+ if (true_color_separator && strcmp (true_color_separator, ":") == 0)
|
||||||
|
+ {
|
||||||
|
+ /* XXX chopps use ITU T.421 ':' separator */
|
||||||
|
+ /* TODO This should be extracted from terminfo/termcap. */
|
||||||
|
+#ifdef TERMINFO
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38:2:%p1%d:%p2%d:%p3%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48:2:%p1%d:%p2%d:%p3%dm";
|
||||||
|
+#else
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38:2:%d:%d:%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48:2:%d:%d:%dm";
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* TODO This should be extracted from terminfo/termcap. */
|
||||||
|
+#ifdef TERMINFO
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38;2;%p1%d;%p2%d;%p3%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48;2;%p1%d;%p2%d;%p3%dm";
|
||||||
|
+#else
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38;2;%d;%d;%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48;2;%d;%d;%dm";
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ tty->TN_max_colors = 16777216;
|
||||||
|
+ /*tty->TN_max_pairs = 64; TODO */
|
||||||
|
+ tty->TN_no_color_video = 0;
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4201,6 +4267,38 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
|
||||||
|
tty->TN_no_color_video = tgetnum ("NC");
|
||||||
|
if (tty->TN_no_color_video == -1)
|
||||||
|
tty->TN_no_color_video = 0;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ /* Allow the user to opt-in to True Color support. */
|
||||||
|
+ char * true_color_separator = getenv ("EMACS_TRUE_COLOR_SEPARATOR");
|
||||||
|
+ if (true_color_separator && strcmp (true_color_separator, ";") == 0)
|
||||||
|
+ {
|
||||||
|
+ /* TODO This should be extracted from terminfo/termcap. */
|
||||||
|
+#ifdef TERMINFO
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38;2;%p1%d;%p2%d;%p3%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48;2;%p1%d;%p2%d;%p3%dm";
|
||||||
|
+#else
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38;2;%d;%d;%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48;2;%d;%d;%dm";
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
+ else if (true_color_separator && strcmp (true_color_separator, ":") == 0)
|
||||||
|
+ {
|
||||||
|
+ /* XXX chopps use ITU T.421 ':' separator */
|
||||||
|
+ /* TODO This should be extracted from terminfo/termcap. */
|
||||||
|
+#ifdef TERMINFO
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38:2:%p1%d:%p2%d:%p3%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48:2:%p1%d:%p2%d:%p3%dm";
|
||||||
|
+#else
|
||||||
|
+ tty->TS_set_rgb_foreground = "\033[38:2:%d:%d:%dm";
|
||||||
|
+ tty->TS_set_rgb_background = "\033[48:2:%d:%d:%dm";
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ tty->TS_set_rgb_foreground = NULL;
|
||||||
|
+ tty->TS_set_rgb_background = NULL;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
tty_default_color_capabilities (tty, 1);
|
||||||
|
diff --git a/src/termchar.h b/src/termchar.h
|
||||||
|
index d8066d7..e48d583 100644
|
||||||
|
--- a/src/termchar.h
|
||||||
|
+++ b/src/termchar.h
|
||||||
|
@@ -157,6 +157,10 @@ struct tty_display_info
|
||||||
|
const char *TS_set_foreground;
|
||||||
|
const char *TS_set_background;
|
||||||
|
|
||||||
|
+ /* Support for 24bit RGB color terminals. */
|
||||||
|
+ const char *TS_set_rgb_foreground;
|
||||||
|
+ const char *TS_set_rgb_background;
|
||||||
|
+
|
||||||
|
int TF_hazeltine; /* termcap hz flag. */
|
||||||
|
int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */
|
||||||
|
int TF_standout_motion; /* termcap mi flag: can move while in standout mode. */
|
||||||
|
diff --git a/src/xfaces.c b/src/xfaces.c
|
||||||
|
index 29c91f7..347ebf8 100644
|
||||||
|
--- a/src/xfaces.c
|
||||||
|
+++ b/src/xfaces.c
|
||||||
|
@@ -382,7 +382,7 @@ static ptrdiff_t lface_id_to_name_size;
|
||||||
|
|
||||||
|
/* TTY color-related functions (defined in tty-colors.el). */
|
||||||
|
|
||||||
|
-static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values;
|
||||||
|
+static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values, Qtty_color_canonicalize;
|
||||||
|
|
||||||
|
/* The name of the function used to compute colors on TTYs. */
|
||||||
|
|
||||||
|
@@ -943,54 +943,80 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color,
|
||||||
|
if (!STRINGP (color) || NILP (Ffboundp (Qtty_color_desc)))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
- XSETFRAME (frame, f);
|
||||||
|
-
|
||||||
|
- color_desc = call2 (Qtty_color_desc, color, frame);
|
||||||
|
- if (CONSP (color_desc) && CONSP (XCDR (color_desc)))
|
||||||
|
+ if (f->output_method == output_termcap
|
||||||
|
+ && f->output_data.tty->display_info->TS_set_rgb_foreground
|
||||||
|
+ && !NILP (Ffboundp (Qtty_color_standard_values)))
|
||||||
|
{
|
||||||
|
- Lisp_Object rgb;
|
||||||
|
-
|
||||||
|
- if (! INTEGERP (XCAR (XCDR (color_desc))))
|
||||||
|
- return 0;
|
||||||
|
+ /* Terminal supports 3 byte RGB colors. */
|
||||||
|
+ if (!NILP (Ffboundp (Qtty_color_canonicalize)))
|
||||||
|
+ color = call1(Qtty_color_canonicalize, color);
|
||||||
|
|
||||||
|
- tty_color->pixel = XINT (XCAR (XCDR (color_desc)));
|
||||||
|
+ color_desc = call1 (Qtty_color_standard_values, color);
|
||||||
|
+ if (! parse_rgb_list (color_desc, tty_color))
|
||||||
|
+ return 0;
|
||||||
|
|
||||||
|
- rgb = XCDR (XCDR (color_desc));
|
||||||
|
- if (! parse_rgb_list (rgb, tty_color))
|
||||||
|
- return 0;
|
||||||
|
+ /* Map XColor to 3 byte values. */
|
||||||
|
+ tty_color->pixel = 1 << 24 /* Set bit 24 to mark RGB values. */
|
||||||
|
+ | (tty_color->red / 256) << 16
|
||||||
|
+ | (tty_color->green / 256) << 8
|
||||||
|
+ | (tty_color->blue / 256);
|
||||||
|
|
||||||
|
- /* Should we fill in STD_COLOR too? */
|
||||||
|
if (std_color)
|
||||||
|
- {
|
||||||
|
- /* Default STD_COLOR to the same as TTY_COLOR. */
|
||||||
|
- *std_color = *tty_color;
|
||||||
|
-
|
||||||
|
- /* Do a quick check to see if the returned descriptor is
|
||||||
|
- actually _exactly_ equal to COLOR, otherwise we have to
|
||||||
|
- lookup STD_COLOR separately. If it's impossible to lookup
|
||||||
|
- a standard color, we just give up and use TTY_COLOR. */
|
||||||
|
- if ((!STRINGP (XCAR (color_desc))
|
||||||
|
- || NILP (Fstring_equal (color, XCAR (color_desc))))
|
||||||
|
- && !NILP (Ffboundp (Qtty_color_standard_values)))
|
||||||
|
- {
|
||||||
|
- /* Look up STD_COLOR separately. */
|
||||||
|
- rgb = call1 (Qtty_color_standard_values, color);
|
||||||
|
- if (! parse_rgb_list (rgb, std_color))
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ *std_color = *tty_color;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
- else if (NILP (Fsymbol_value (intern ("tty-defined-color-alist"))))
|
||||||
|
- /* We were called early during startup, and the colors are not
|
||||||
|
- yet set up in tty-defined-color-alist. Don't return a failure
|
||||||
|
- indication, since this produces the annoying "Unable to
|
||||||
|
- load color" messages in the *Messages* buffer. */
|
||||||
|
- return 1;
|
||||||
|
else
|
||||||
|
- /* tty-color-desc seems to have returned a bad value. */
|
||||||
|
- return 0;
|
||||||
|
+ {
|
||||||
|
+ XSETFRAME (frame, f);
|
||||||
|
+
|
||||||
|
+ color_desc = call2 (Qtty_color_desc, color, frame);
|
||||||
|
+ if (CONSP (color_desc) && CONSP (XCDR (color_desc)))
|
||||||
|
+ {
|
||||||
|
+ Lisp_Object rgb;
|
||||||
|
+
|
||||||
|
+ if (! INTEGERP (XCAR (XCDR (color_desc))))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ tty_color->pixel = XINT (XCAR (XCDR (color_desc)));
|
||||||
|
+
|
||||||
|
+ rgb = XCDR (XCDR (color_desc));
|
||||||
|
+ if (! parse_rgb_list (rgb, tty_color))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ /* Should we fill in STD_COLOR too? */
|
||||||
|
+ if (std_color)
|
||||||
|
+ {
|
||||||
|
+ /* Default STD_COLOR to the same as TTY_COLOR. */
|
||||||
|
+ *std_color = *tty_color;
|
||||||
|
+
|
||||||
|
+ /* Do a quick check to see if the returned descriptor is
|
||||||
|
+ actually _exactly_ equal to COLOR, otherwise we have to
|
||||||
|
+ lookup STD_COLOR separately. If it's impossible to lookup
|
||||||
|
+ a standard color, we just give up and use TTY_COLOR. */
|
||||||
|
+ if ((!STRINGP (XCAR (color_desc))
|
||||||
|
+ || NILP (Fstring_equal (color, XCAR (color_desc))))
|
||||||
|
+ && !NILP (Ffboundp (Qtty_color_standard_values)))
|
||||||
|
+ {
|
||||||
|
+ /* Look up STD_COLOR separately. */
|
||||||
|
+ rgb = call1 (Qtty_color_standard_values, color);
|
||||||
|
+ if (! parse_rgb_list (rgb, std_color))
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ else if (NILP (Fsymbol_value (intern ("tty-defined-color-alist"))))
|
||||||
|
+ /* We were called early during startup, and the colors are not
|
||||||
|
+ yet set up in tty-defined-color-alist. Don't return a failure
|
||||||
|
+ indication, since this produces the annoying "Unable to
|
||||||
|
+ load color" messages in the *Messages* buffer. */
|
||||||
|
+ return 1;
|
||||||
|
+ else
|
||||||
|
+ /* tty-color-desc seems to have returned a bad value. */
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A version of defined_color for non-X frames. */
|
||||||
|
@@ -1008,7 +1034,9 @@ tty_defined_color (struct frame *f, const char *color_name,
|
||||||
|
color_def->green = 0;
|
||||||
|
|
||||||
|
if (*color_name)
|
||||||
|
- status = tty_lookup_color (f, build_string (color_name), color_def, NULL);
|
||||||
|
+ {
|
||||||
|
+ status = tty_lookup_color (f, build_string (color_name), color_def, NULL);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (color_def->pixel == FACE_TTY_DEFAULT_COLOR && *color_name)
|
||||||
|
{
|
||||||
|
@@ -5780,6 +5808,7 @@ map_tty_color (struct frame *f, struct face *face,
|
||||||
|
unsigned long default_pixel =
|
||||||
|
foreground_p ? FACE_TTY_DEFAULT_FG_COLOR : FACE_TTY_DEFAULT_BG_COLOR;
|
||||||
|
unsigned long pixel = default_pixel;
|
||||||
|
+ XColor true_color;
|
||||||
|
#ifdef MSDOS
|
||||||
|
unsigned long default_other_pixel =
|
||||||
|
foreground_p ? FACE_TTY_DEFAULT_BG_COLOR : FACE_TTY_DEFAULT_FG_COLOR;
|
||||||
|
@@ -5798,7 +5827,18 @@ map_tty_color (struct frame *f, struct face *face,
|
||||||
|
{
|
||||||
|
/* Associations in tty-defined-color-alist are of the form
|
||||||
|
(NAME INDEX R G B). We need the INDEX part. */
|
||||||
|
- pixel = XINT (XCAR (XCDR (def)));
|
||||||
|
+ if (f->output_method == output_termcap
|
||||||
|
+ && f->output_data.tty->display_info->TS_set_rgb_foreground
|
||||||
|
+ && parse_rgb_list (XCDR (XCDR(def)), &true_color))
|
||||||
|
+ {
|
||||||
|
+ /* Map XColor to 3 byte values. */
|
||||||
|
+ pixel = 1 << 24 /* Set bit 24 to mark RGB values. */
|
||||||
|
+ | (true_color.red / 256) << 16
|
||||||
|
+ | (true_color.green / 256) << 8
|
||||||
|
+ | (true_color.blue / 256);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ pixel = XINT (XCAR (XCDR (def)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pixel == default_pixel && STRINGP (color))
|
||||||
|
@@ -6460,6 +6500,7 @@ syms_of_xfaces (void)
|
||||||
|
DEFSYM (Qwindow_divider, "window-divider");
|
||||||
|
DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel");
|
||||||
|
DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel");
|
||||||
|
+ DEFSYM (Qtty_color_canonicalize, "tty-color-canonicalize");
|
||||||
|
DEFSYM (Qtty_color_desc, "tty-color-desc");
|
||||||
|
DEFSYM (Qtty_color_standard_values, "tty-color-standard-values");
|
||||||
|
DEFSYM (Qtty_color_by_index, "tty-color-by-index");
|
@ -81,10 +81,10 @@
|
|||||||
aggressive-indent = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
|
aggressive-indent = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "aggressive-indent";
|
pname = "aggressive-indent";
|
||||||
version = "1.4";
|
version = "1.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/aggressive-indent-1.4.el";
|
url = "http://elpa.gnu.org/packages/aggressive-indent-1.5.el";
|
||||||
sha256 = "0qdpvdzmw4hq2g8krx93fbb352nkg731p7v82zhqw76y79khdpka";
|
sha256 = "00ddfni659rl19ybzrywj3b444akvil6n06k8lf5jyaqb53mkc5d";
|
||||||
};
|
};
|
||||||
packageRequires = [ cl-lib emacs ];
|
packageRequires = [ cl-lib emacs ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -95,10 +95,10 @@
|
|||||||
ahungry-theme = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
ahungry-theme = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "ahungry-theme";
|
pname = "ahungry-theme";
|
||||||
version = "1.0.12";
|
version = "1.1.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/ahungry-theme-1.0.12.tar";
|
url = "http://elpa.gnu.org/packages/ahungry-theme-1.1.0.tar";
|
||||||
sha256 = "0a6mlxka1b7vja4wxd8gvfhfk5i1jdj3a851c7dn34hz1lkgvnx8";
|
sha256 = "1jy2h4r72fr26yavs0s8dy1xnkxvaf2hsrlm63f6sng81njj9dgx";
|
||||||
};
|
};
|
||||||
packageRequires = [ emacs ];
|
packageRequires = [ emacs ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -119,6 +119,19 @@
|
|||||||
license = lib.licenses.free;
|
license = lib.licenses.free;
|
||||||
};
|
};
|
||||||
}) {};
|
}) {};
|
||||||
|
ampc = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
|
pname = "ampc";
|
||||||
|
version = "0.2";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://elpa.gnu.org/packages/ampc-0.2.el";
|
||||||
|
sha256 = "1pdy5mvi6h8m7qjnxiy217fgcp9w91375hq29bacfgh7bix56jlr";
|
||||||
|
};
|
||||||
|
packageRequires = [];
|
||||||
|
meta = {
|
||||||
|
homepage = "http://elpa.gnu.org/packages/ampc.html";
|
||||||
|
license = lib.licenses.free;
|
||||||
|
};
|
||||||
|
}) {};
|
||||||
ascii-art-to-unicode = callPackage ({ elpaBuild, fetchurl, lib }:
|
ascii-art-to-unicode = callPackage ({ elpaBuild, fetchurl, lib }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "ascii-art-to-unicode";
|
pname = "ascii-art-to-unicode";
|
||||||
@ -201,10 +214,10 @@
|
|||||||
}) {};
|
}) {};
|
||||||
beacon = callPackage ({ elpaBuild, fetchurl, lib, seq }: elpaBuild {
|
beacon = callPackage ({ elpaBuild, fetchurl, lib, seq }: elpaBuild {
|
||||||
pname = "beacon";
|
pname = "beacon";
|
||||||
version = "0.6.1";
|
version = "1.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/beacon-0.6.1.el";
|
url = "http://elpa.gnu.org/packages/beacon-1.0.el";
|
||||||
sha256 = "0zg3gzfx06f3pj7mipfdmhmafvcil0idha3wdi068cza7akmyiwb";
|
sha256 = "1rdvdn50kb7kplvi8x199cm15mn4pxidn17p84l8q5wk3arj9c09";
|
||||||
};
|
};
|
||||||
packageRequires = [ seq ];
|
packageRequires = [ seq ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -215,10 +228,10 @@
|
|||||||
bug-hunter = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, seq }:
|
bug-hunter = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, seq }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "bug-hunter";
|
pname = "bug-hunter";
|
||||||
version = "1.0.1";
|
version = "1.1";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/bug-hunter-1.0.1.el";
|
url = "http://elpa.gnu.org/packages/bug-hunter-1.1.el";
|
||||||
sha256 = "0c0pg542y09c1k25dxk2062pj3cj12i73kqxbpq0m6af0qm7wy9d";
|
sha256 = "07j455hizqiicpigy8ybpqk0v87iqa57jvpirg5yb2g8j5ipwygs";
|
||||||
};
|
};
|
||||||
packageRequires = [ cl-lib seq ];
|
packageRequires = [ cl-lib seq ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -617,10 +630,10 @@
|
|||||||
}) {};
|
}) {};
|
||||||
exwm = callPackage ({ elpaBuild, fetchurl, lib, xelb }: elpaBuild {
|
exwm = callPackage ({ elpaBuild, fetchurl, lib, xelb }: elpaBuild {
|
||||||
pname = "exwm";
|
pname = "exwm";
|
||||||
version = "0.1";
|
version = "0.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/exwm-0.1.tar";
|
url = "http://elpa.gnu.org/packages/exwm-0.2.tar";
|
||||||
sha256 = "18w9a37v8lyyjj8ll2f5mw8fw14g54b887cflzv5d576k5f606f5";
|
sha256 = "0z96zz6h5r880nbhclbxs2r0zfkg771lg0fjghigqxz8ai0hh1ll";
|
||||||
};
|
};
|
||||||
packageRequires = [ xelb ];
|
packageRequires = [ xelb ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -1044,10 +1057,10 @@
|
|||||||
}) {};
|
}) {};
|
||||||
multishell = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
multishell = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
pname = "multishell";
|
pname = "multishell";
|
||||||
version = "1.1.2";
|
version = "1.1.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/multishell-1.1.2.tar";
|
url = "http://elpa.gnu.org/packages/multishell-1.1.5.tar";
|
||||||
sha256 = "1y0b6ri0kgxj0jw1cyb796lsy3ipzb7syvmj7pqpx9myzpvd3hz3";
|
sha256 = "0g38p5biyxqkjdkmxlikvhkhkmafyy3ibd012q83skaf8fi4cv1y";
|
||||||
};
|
};
|
||||||
packageRequires = [];
|
packageRequires = [];
|
||||||
meta = {
|
meta = {
|
||||||
@ -1202,10 +1215,10 @@
|
|||||||
}) {};
|
}) {};
|
||||||
org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
pname = "org";
|
pname = "org";
|
||||||
version = "20160201";
|
version = "20160215";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/org-20160201.tar";
|
url = "http://elpa.gnu.org/packages/org-20160215.tar";
|
||||||
sha256 = "1lyvfpksl88c9d7k2w4k3iswgjah51k9f8fdi3jbfwivd814m9nb";
|
sha256 = "0w2686rza4xdknq3sy87s04zvlmjxyr6wrj9y9ydcv8hbzws3bhd";
|
||||||
};
|
};
|
||||||
packageRequires = [];
|
packageRequires = [];
|
||||||
meta = {
|
meta = {
|
||||||
@ -1492,10 +1505,10 @@
|
|||||||
}) {};
|
}) {};
|
||||||
spinner = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
spinner = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
pname = "spinner";
|
pname = "spinner";
|
||||||
version = "1.4";
|
version = "1.7";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/spinner-1.4.el";
|
url = "http://elpa.gnu.org/packages/spinner-1.7.el";
|
||||||
sha256 = "0j4x8hbnhda83yyb31mm9b014pfb81gdfsr026rhn8ls3y163dbf";
|
sha256 = "1y78kr26mi74xf0qh32dvhk7w3bkj6d9i2iw1mypsr0h5phg8ahf";
|
||||||
};
|
};
|
||||||
packageRequires = [];
|
packageRequires = [];
|
||||||
meta = {
|
meta = {
|
||||||
@ -1532,10 +1545,10 @@
|
|||||||
svg-clock = callPackage ({ elpaBuild, emacs, fetchurl, lib, svg }:
|
svg-clock = callPackage ({ elpaBuild, emacs, fetchurl, lib, svg }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "svg-clock";
|
pname = "svg-clock";
|
||||||
version = "0.5";
|
version = "1.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/svg-clock-0.5.el";
|
url = "http://elpa.gnu.org/packages/svg-clock-1.0.el";
|
||||||
sha256 = "1i77c7nyqcwc6b6n7vdh95xbmwv5kpdds6j7pklp4c9vbvm8axgp";
|
sha256 = "0j6zk7fsv72af12phqdw8axbn2y8y4rfgxiab1p3pxq3y7k47jid";
|
||||||
};
|
};
|
||||||
packageRequires = [ emacs svg ];
|
packageRequires = [ emacs svg ];
|
||||||
meta = {
|
meta = {
|
||||||
@ -1623,6 +1636,19 @@
|
|||||||
license = lib.licenses.free;
|
license = lib.licenses.free;
|
||||||
};
|
};
|
||||||
}) {};
|
}) {};
|
||||||
|
tramp-theme = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild {
|
||||||
|
pname = "tramp-theme";
|
||||||
|
version = "0.1.1";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://elpa.gnu.org/packages/tramp-theme-0.1.1.el";
|
||||||
|
sha256 = "0l8i625h9sc6h59qfj847blmfwfhf9bvfsbmwfb56qzs535fby3y";
|
||||||
|
};
|
||||||
|
packageRequires = [ emacs ];
|
||||||
|
meta = {
|
||||||
|
homepage = "http://elpa.gnu.org/packages/tramp-theme.html";
|
||||||
|
license = lib.licenses.free;
|
||||||
|
};
|
||||||
|
}) {};
|
||||||
transcribe = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
transcribe = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
pname = "transcribe";
|
pname = "transcribe";
|
||||||
version = "1.0.2";
|
version = "1.0.2";
|
||||||
@ -1675,6 +1701,20 @@
|
|||||||
license = lib.licenses.free;
|
license = lib.licenses.free;
|
||||||
};
|
};
|
||||||
}) {};
|
}) {};
|
||||||
|
url-http-ntlm = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, ntlm ? null }:
|
||||||
|
elpaBuild {
|
||||||
|
pname = "url-http-ntlm";
|
||||||
|
version = "2.0.1";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.1.tar";
|
||||||
|
sha256 = "0h6xsm1x7v69kb4shyvv1p4f6sxgcqs5ap6ylqydz10mbcx7aq0w";
|
||||||
|
};
|
||||||
|
packageRequires = [ cl-lib ntlm ];
|
||||||
|
meta = {
|
||||||
|
homepage = "http://elpa.gnu.org/packages/url-http-ntlm.html";
|
||||||
|
license = lib.licenses.free;
|
||||||
|
};
|
||||||
|
}) {};
|
||||||
vlf = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
vlf = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
|
||||||
pname = "vlf";
|
pname = "vlf";
|
||||||
version = "1.7";
|
version = "1.7";
|
||||||
@ -1809,10 +1849,10 @@
|
|||||||
xelb = callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }:
|
xelb = callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }:
|
||||||
elpaBuild {
|
elpaBuild {
|
||||||
pname = "xelb";
|
pname = "xelb";
|
||||||
version = "0.4";
|
version = "0.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://elpa.gnu.org/packages/xelb-0.4.tar";
|
url = "http://elpa.gnu.org/packages/xelb-0.5.tar";
|
||||||
sha256 = "1m3wmlzcnbv1akncdaakfy4xmxyjnfb6yl1nfahwf4lfxlsvnwzd";
|
sha256 = "1wypffg492r2a3h136c6mphsbgimxcipsarm971z56kpy3lwi4sb";
|
||||||
};
|
};
|
||||||
packageRequires = [ cl-generic emacs ];
|
packageRequires = [ cl-generic emacs ];
|
||||||
meta = {
|
meta = {
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -148,14 +148,14 @@ in
|
|||||||
|
|
||||||
android-studio = buildAndroidStudio rec {
|
android-studio = buildAndroidStudio rec {
|
||||||
name = "android-studio-${version}";
|
name = "android-studio-${version}";
|
||||||
version = "1.5.1.0";
|
version = "2.0.0.0";
|
||||||
build = "141.2456560";
|
build = "143.2443734";
|
||||||
description = "Android development environment based on IntelliJ IDEA";
|
description = "Android development environment based on IntelliJ IDEA";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = stdenv.lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}" +
|
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}" +
|
||||||
"/android-studio-ide-${build}-linux.zip";
|
"/android-studio-ide-${build}-linux.zip";
|
||||||
sha256 = "0p6h21jd0xx3xzdrfv9530n1ssyc3xigr3fg33r8ain4k6n02vj6";
|
sha256 = "0j6bi87hb5jxjwfhfya64s673vdkdslsqc6sqa4zl97sabvafk2w";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -185,25 +185,25 @@ in
|
|||||||
|
|
||||||
idea-community = buildIdea rec {
|
idea-community = buildIdea rec {
|
||||||
name = "idea-community-${version}";
|
name = "idea-community-${version}";
|
||||||
version = "15.0.3";
|
version = "15.0.4";
|
||||||
build = "IC-143.1821";
|
build = "IC-143.2287";
|
||||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = stdenv.lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||||
sha256 = "15hj4kqlpg3b4xp2v4f4iidascrc8s97mq8022nvbcs879gpajqa";
|
sha256 = "05kah5cx7x3rlaaxkvbbm7g8jvy9hc38q4jv7j5r9rkxd38fslvn";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
idea-ultimate = buildIdea rec {
|
idea-ultimate = buildIdea rec {
|
||||||
name = "idea-ultimate-${version}";
|
name = "idea-ultimate-${version}";
|
||||||
version = "15.0.3";
|
version = "15.0.4";
|
||||||
build = "IU-143.1821";
|
build = "IU-143.2287";
|
||||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz";
|
url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz";
|
||||||
sha256 = "02v8v2a7p620l4mlk7jqw9sl2455a1nya1dy84y23h9vq20aihlh";
|
sha256 = "0416y7krrak1q5pb8axskdamy06nfxmn4hj7421j8jaz0nc50dn4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kile-${version}";
|
name = "kile-${version}";
|
||||||
version = "2016-02-12";
|
version = "2016-02-14";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = git://anongit.kde.org/kile.git;
|
url = git://anongit.kde.org/kile.git;
|
||||||
rev = "c586532031872319ae5102fb13ab6de8d80da065";
|
rev = "7b238c42580abc936816d4ea0df61d0cbbefecc4";
|
||||||
sha256 = "7d5ef8b8c1254a5988a1028e415c9139fbd20a9e6771413c38fa58345a744a7b";
|
sha256 = "f37d531489a84911b47664697bb3bddc0ba5591854749c17fb0c6b1e71dbc6ee";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, pythonPackages, fetchgit }:
|
{ stdenv, pythonPackages, fetchgit }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "leo-editor-${version}";
|
name = "leo-editor-${version}";
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
version = "5.1";
|
version = "5.1";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, fetchurl, tk, buildPythonPackage, pythonPackages }:
|
{ pkgs, fetchurl, tk, buildPythonApplication, pythonPackages }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
version = "0.9.2";
|
version = "0.9.2";
|
||||||
name = "nvpy-${version}";
|
name = "nvpy-${version}";
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{ stdenv, fetchFromGitHub, ncurses, gettext, pkgconfig
|
{ stdenv, fetchFromGitHub, fetchurl, ncurses, gettext, pkgconfig
|
||||||
|
# default vimrc
|
||||||
|
, vimrc ? fetchurl {
|
||||||
|
name = "default-vimrc";
|
||||||
|
url = https://projects.archlinux.org/svntogit/packages.git/plain/trunk/archlinux.vim?h=packages/vim?id=68f6d131750aa778807119e03eed70286a17b1cb;
|
||||||
|
sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c";
|
||||||
|
}
|
||||||
# apple frameworks
|
# apple frameworks
|
||||||
, Carbon, Cocoa }:
|
, Carbon, Cocoa }:
|
||||||
|
|
||||||
@ -25,7 +30,11 @@ stdenv.mkDerivation rec {
|
|||||||
"--enable-nls"
|
"--enable-nls"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = "ln -s $out/bin/vim $out/bin/vi";
|
postInstall = ''
|
||||||
|
ln -s $out/bin/vim $out/bin/vi
|
||||||
|
mkdir -p $out/share/vim
|
||||||
|
cp "${vimrc}" $out/share/vim/vimrc
|
||||||
|
'';
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gimp-2.8.16";
|
name = "gimp-2.8.16";
|
||||||
|
|
||||||
|
# This declarations for `gimp-with-plugins` wrapper,
|
||||||
|
# (used for determining $out/lib/gimp/${majorVersion}/ paths)
|
||||||
|
majorVersion = "2.0";
|
||||||
|
targetPluginDir = "$out/lib/gimp/${majorVersion}/plug-ins";
|
||||||
|
targetScriptDir = "$out/lib/gimp/${majorVersion}/scripts";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.gimp.org/pub/gimp/v2.8/${name}.tar.bz2";
|
url = "http://download.gimp.org/pub/gimp/v2.8/${name}.tar.bz2";
|
||||||
sha256 = "1dsgazia9hmab8cw3iis7s69dvqyfj5wga7ds7w2q5mms1xqbqwm";
|
sha256 = "1dsgazia9hmab8cw3iis7s69dvqyfj5wga7ds7w2q5mms1xqbqwm";
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
{ pkgs, gimp }:
|
{ pkgs, gimp }:
|
||||||
let
|
let
|
||||||
inherit (pkgs) stdenv fetchurl pkgconfig glib;
|
inherit (pkgs) stdenv fetchurl pkgconfig glib;
|
||||||
targetPluginDir = "$out/${gimp.name}-plugins";
|
inherit (gimp) targetPluginDir targetScriptDir;
|
||||||
targetScriptDir = "$out/${gimp.name}-scripts";
|
|
||||||
prefix = "plugin-gimp-";
|
|
||||||
|
|
||||||
pluginDerivation = a: stdenv.mkDerivation ({
|
pluginDerivation = a: stdenv.mkDerivation ({
|
||||||
prePhases = "extraLib";
|
prePhases = "extraLib";
|
||||||
@ -52,7 +50,7 @@ rec {
|
|||||||
name = "gap-2.6.0";
|
name = "gap-2.6.0";
|
||||||
buildInputs = [ gimp pkgconfig glib pkgs.intltool gimp.gtk ] ++ gimp.nativeBuildInputs;
|
buildInputs = [ gimp pkgconfig glib pkgs.intltool gimp.gtk ] ++ gimp.nativeBuildInputs;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = ftp://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2;
|
url = http://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2;
|
||||||
sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
|
sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
|
||||||
};
|
};
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
33
pkgs/applications/graphics/gimp/wrapper.nix
Normal file
33
pkgs/applications/graphics/gimp/wrapper.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{ stdenv, lib, buildEnv, gimp, makeWrapper, gimpPlugins, plugins ? null}:
|
||||||
|
|
||||||
|
let
|
||||||
|
allPlugins = lib.filter (pkg: builtins.isAttrs pkg && pkg.type == "derivation") (lib.attrValues gimpPlugins);
|
||||||
|
selectedPlugins = if plugins == null then allPlugins else plugins;
|
||||||
|
extraArgs = map (x: x.wrapArgs or "") selectedPlugins;
|
||||||
|
|
||||||
|
drv = buildEnv {
|
||||||
|
name = "gimp-with-plugins-" + (builtins.parseDrvName gimp.name).version;
|
||||||
|
|
||||||
|
paths = [ gimp ] ++ selectedPlugins;
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
# TODO: This could be avoided if buildEnv could be forced to create all directories
|
||||||
|
if [ -L $out/bin ]; then
|
||||||
|
rm $out/bin
|
||||||
|
mkdir $out/bin
|
||||||
|
for i in ${gimp}/bin/*; do
|
||||||
|
ln -s $i $out/bin
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
for each in gimp-2.8 gimp-console-2.8; do
|
||||||
|
wrapProgram $out/bin/$each \
|
||||||
|
--set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \
|
||||||
|
${toString extraArgs}
|
||||||
|
done
|
||||||
|
set +x
|
||||||
|
for each in gimp gimp-console; do
|
||||||
|
ln -sf "$each-2.8" $out/bin/$each
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|
@ -1,23 +1,25 @@
|
|||||||
{ stdenv, cmake, fetchurl, gnumake, pkgconfig
|
{ stdenv, cmake, fetchurl, gnumake, pkgconfig, makeWrapper
|
||||||
, boost, gettext, tclap, wxGTK
|
, boost, gettext, tclap, wxGTK
|
||||||
, freeglut, glew, libXi, libXmu, mesa
|
, freeglut, glew, libXi, libXmu, mesa
|
||||||
, autopanosiftc, enblend-enfuse, exiv2, ilmbase, lensfun, libpng, libtiff
|
, autopanosiftc, enblend-enfuse, exiv2, fftw, ilmbase, lensfun, libpng, libtiff
|
||||||
, openexr, panotools, perlPackages
|
, openexr, panotools, perlPackages, sqlite, vigra
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "hugin-2013.0.0";
|
name = "hugin-2015.0.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/hugin/${name}.tar.bz2";
|
url = "mirror://sourceforge/hugin/${name}.tar.bz2";
|
||||||
sha256 = "1mgbvg09xvf0zcm9jfv5lb65nd292l86ffa23yp4pzm6izaiwkj8";
|
sha256 = "1gfblax9rxay8xskz5r8bips4nfh70vkyrb8ksgl6pg91c8krn9c";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
|
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
|
||||||
|
|
||||||
buildInputs = [ boost gettext tclap wxGTK
|
buildInputs = [ boost gettext tclap wxGTK
|
||||||
freeglut glew libXi libXmu mesa
|
freeglut glew libXi libXmu mesa
|
||||||
exiv2 ilmbase lensfun libtiff libpng openexr panotools
|
exiv2 fftw ilmbase lensfun libtiff libpng openexr panotools
|
||||||
|
sqlite vigra
|
||||||
|
perlPackages.ImageExifTool makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
# disable installation of the python scripting interface
|
# disable installation of the python scripting interface
|
||||||
@ -27,22 +29,21 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# commandline tools needed by the hugin batch processor
|
|
||||||
# you may have to tell hugin (in the preferences) where these binaries reside
|
|
||||||
propagatedUserEnvPackages = [ autopanosiftc enblend-enfuse gnumake
|
|
||||||
perlPackages.ImageExifTool
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p "$out/nix-support"
|
for p in $out/bin/*; do
|
||||||
echo $propagatedUserEnvPackages > $out/nix-support/propagated-user-env-packages
|
wrapProgram "$p" \
|
||||||
|
--suffix PATH : ${autopanosiftc}/bin \
|
||||||
|
--suffix PATH : ${enblend-enfuse}/bin \
|
||||||
|
--suffix PATH : ${gnumake}/bin \
|
||||||
|
--suffix PATH : ${perlPackages.ImageExifTool}/bin
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://hugin.sourceforge.net/;
|
homepage = http://hugin.sourceforge.net/;
|
||||||
description = "Toolkit for stitching photographs and assembling panoramas, together with an easy to use graphical front end";
|
description = "Toolkit for stitching photographs and assembling panoramas, together with an easy to use graphical front end";
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = stdenv.lib.licenses.gpl2Plus;
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
maintainers = with stdenv.lib.maintainers; [ viric hrdinka ];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchsvn, buildPythonPackage, python, pyGtkGlade, makeWrapper, pyexiv2, pythonPackages, fbida, which }:
|
{ stdenv, fetchsvn, buildPythonApplication, python, pyGtkGlade, makeWrapper, pyexiv2, pythonPackages, fbida, which }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
name = "jbrout-${version}";
|
name = "jbrout-${version}";
|
||||||
version = "338";
|
version = "338";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, buildPythonPackage, python27Packages }:
|
{ stdenv, fetchurl, buildPythonApplication, python27Packages }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
name = "mcomix-1.01";
|
name = "mcomix-1.01";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, buildPythonPackage, python, pygtk, pillow, libX11, gettext }:
|
{ stdenv, fetchurl, buildPythonApplication, python, pygtk, pillow, libX11, gettext }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonApplication rec {
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
name = "mirage-0.9.5.2";
|
name = "mirage-0.9.5.2";
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ callPackage, fetchgit, ... } @ args:
|
{ callPackage, fetchgit, ... } @ args:
|
||||||
|
|
||||||
callPackage ./generic.nix (args // {
|
callPackage ./generic.nix (args // {
|
||||||
version = "2016-01-25";
|
version = "2016-02-25";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
sha256 = "db1fecd671bd8b3a777138bb4815285b4364ee3ad01ab05424b4aa0c20ed9919";
|
sha256 = "842b1186d38de14221be514a58f77c23d9f83979ea45f846440cf9cbb1f26c1f";
|
||||||
rev = "056f590f2d147099554d97a89dd5e0ddfa8d6dda";
|
rev = "c5117ed0f1b522eab10fd2248f140b2acad2a708";
|
||||||
url = "git://alioth.debian.org/git/sane/sane-backends.git";
|
url = "git://alioth.debian.org/git/sane/sane-backends.git";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -35,9 +35,11 @@ let
|
|||||||
dolphin = callPackage ./dolphin.nix {};
|
dolphin = callPackage ./dolphin.nix {};
|
||||||
dolphin-plugins = callPackage ./dolphin-plugins.nix {};
|
dolphin-plugins = callPackage ./dolphin-plugins.nix {};
|
||||||
ffmpegthumbs = callPackage ./ffmpegthumbs.nix {};
|
ffmpegthumbs = callPackage ./ffmpegthumbs.nix {};
|
||||||
|
filelight = callPackage ./filelight.nix {};
|
||||||
gpgmepp = callPackage ./gpgmepp.nix {};
|
gpgmepp = callPackage ./gpgmepp.nix {};
|
||||||
gwenview = callPackage ./gwenview.nix {};
|
gwenview = callPackage ./gwenview.nix {};
|
||||||
kate = callPackage ./kate.nix {};
|
kate = callPackage ./kate.nix {};
|
||||||
|
kcalc = callPackage ./kcalc.nix {};
|
||||||
kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {};
|
kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {};
|
||||||
kdenetwork-filesharing = callPackage ./kdenetwork-filesharing.nix {};
|
kdenetwork-filesharing = callPackage ./kdenetwork-filesharing.nix {};
|
||||||
kgpg = callPackage ./kgpg.nix { inherit (pkgs.kde4) kdepimlibs; };
|
kgpg = callPackage ./kgpg.nix { inherit (pkgs.kde4) kdepimlibs; };
|
||||||
|
35
pkgs/applications/kde-apps-15.12/filelight.nix
Normal file
35
pkgs/applications/kde-apps-15.12/filelight.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ kdeApp
|
||||||
|
, lib
|
||||||
|
, extra-cmake-modules
|
||||||
|
, kdoctools
|
||||||
|
, makeQtWrapper
|
||||||
|
, qtscript
|
||||||
|
, kio
|
||||||
|
, solid
|
||||||
|
, kxmlgui
|
||||||
|
, kparts
|
||||||
|
}:
|
||||||
|
|
||||||
|
kdeApp {
|
||||||
|
name = "filelight";
|
||||||
|
nativeBuildInputs = [
|
||||||
|
extra-cmake-modules
|
||||||
|
kdoctools
|
||||||
|
makeQtWrapper
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
kio
|
||||||
|
kparts
|
||||||
|
qtscript
|
||||||
|
solid
|
||||||
|
kxmlgui
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapQtProgram "$out/bin/filelight"
|
||||||
|
'';
|
||||||
|
meta = {
|
||||||
|
license = with lib.licenses; [ gpl2 ];
|
||||||
|
maintainers = with lib.maintainers; [ fridh vcunat ];
|
||||||
|
};
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user