Merge branch 'master' of github.com:NixOS/nixpkgs
This commit is contained in:
commit
f2cc21a8b4
@ -169,8 +169,8 @@ stdenv.mkDerivation { ...
|
|||||||
args: with args; <replaceable>...</replaceable>
|
args: with args; <replaceable>...</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ stdenv, fetchurl, perl, ... }: <replaceable>...</replaceable>
|
{ stdenv, fetchurl, perl, ... }: <replaceable>...</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -598,6 +598,51 @@ evaluate correctly.</para>
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
<section xml:id="sec-sources"><title>Fetching Sources</title>
|
||||||
|
<para>There are multiple ways to fetch a package source in nixpkgs. The
|
||||||
|
general guidline is that you should package sources with a high degree of
|
||||||
|
availability. Right now there is only one fetcher which has mirroring
|
||||||
|
support and that is <literal>fetchurl</literal>. Note that you should also
|
||||||
|
prefer protocols which have a corresponding proxy environment variable.
|
||||||
|
</para>
|
||||||
|
<para>You can find many source fetch helpers in <literal>pkgs/build-support/fetch*</literal>.
|
||||||
|
</para>
|
||||||
|
<para>In the file <literal>pkgs/top-level/all-packages.nix</literal> you can
|
||||||
|
find fetch helpers, these have names on the form
|
||||||
|
<literal>fetchFrom*</literal>. The intention of these are to provide
|
||||||
|
snapshot fetches but using the same api as some of the version controlled
|
||||||
|
fetchers from <literal>pkgs/build-support/</literal>. As an example going
|
||||||
|
from bad to good:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Uses <literal>git://</literal> which won't be proxied.
|
||||||
|
<programlisting>
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://github.com/NixOS/nix.git";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
|
||||||
|
}
|
||||||
|
</programlisting></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>This is ok, but an archive fetch will still be faster.
|
||||||
|
<programlisting>
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/NixOS/nix.git";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
|
||||||
|
}
|
||||||
|
</programlisting></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>Fetches a snapshot archive and you get the rev you want.
|
||||||
|
<programlisting>
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nix";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9";
|
||||||
|
}
|
||||||
|
</programlisting></para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -624,7 +624,7 @@ $ cat > Gemfile
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gem 'sensu'
|
gem 'sensu'
|
||||||
$ bundler package --path /tmp/vendor/bundle
|
$ bundler package --path /tmp/vendor/bundle
|
||||||
$ $(nix-build '&nixpkgs>' -A bundix)/bin/bundix
|
$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix
|
||||||
$ cat > default.nix
|
$ cat > default.nix
|
||||||
{ lib, bundlerEnv, ruby }:
|
{ lib, bundlerEnv, ruby }:
|
||||||
|
|
||||||
@ -662,20 +662,19 @@ standard Go packages.
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
net = buildGoPackage rec {
|
net = buildGoPackage rec {
|
||||||
name = "go.net-${rev}";
|
name = "go.net-${rev}";
|
||||||
goPackagePath = "code.google.com/p/go.net"; <co xml:id='ex-buildGoPackage-1' />
|
goPackagePath = "golang.org/x/net"; <co xml:id='ex-buildGoPackage-1' />
|
||||||
subPackages = [ "ipv4" "ipv6" ]; <co xml:id='ex-buildGoPackage-2' />
|
subPackages = [ "ipv4" "ipv6" ]; <co xml:id='ex-buildGoPackage-2' />
|
||||||
rev = "28ff664507e4";
|
rev = "e0403b4e005";
|
||||||
src = fetchhg {
|
src = fetchFromGitHub {
|
||||||
inherit rev;
|
inherit rev;
|
||||||
url = "https://${goPackagePath}";
|
owner = "golang";
|
||||||
sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav";
|
repo = "net";
|
||||||
|
sha256 = "1g7cjzw4g4301a3yqpbk8n1d4s97sfby2aysl275x04g0zh8jxqp";
|
||||||
};
|
};
|
||||||
renameImports = [ <co xml:id='ex-buildGoPackage-3' />
|
goPackageAliases = [ "code.google.com/p/go.net" ]; <co xml:id='ex-buildGoPackage-3' />
|
||||||
"code.google.com/p/go.crypto golang.org/x/crypto"
|
|
||||||
"code.google.com/p/goprotobuf github.com/golang/protobuf"
|
|
||||||
];
|
|
||||||
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-4' />
|
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-4' />
|
||||||
buildFlags = "--tags release"; <co xml:id='ex-buildGoPackage-5' />
|
buildFlags = "--tags release"; <co xml:id='ex-buildGoPackage-5' />
|
||||||
|
disabled = isGo13;<co xml:id='ex-buildGoPackage-6' />
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
@ -703,17 +702,18 @@ the following arguments are of special significance to the function:
|
|||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs='ex-buildGoPackage-4'>
|
<callout arearefs='ex-buildGoPackage-3'>
|
||||||
<para>
|
<para>
|
||||||
<varname>renameImports</varname> is a list of import paths to be renamed before
|
<varname>goPackageAliases</varname> is a list of alternative import paths
|
||||||
building the package. The path to be renamed can be a regular expression.
|
that are valid for this library.
|
||||||
|
Packages that depend on this library will automatically rename
|
||||||
|
import paths that match any of the aliases to <literal>goPackagePath</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In this example imports will be renamed from
|
In this example imports will be renamed from
|
||||||
<literal>code.google.com/p/go.crypto</literal> to
|
<literal>code.google.com/p/go.net</literal> to
|
||||||
<literal>golang.org/x/crypto</literal> and from
|
<literal>golang.org/x/net</literal> in every package that depend on the
|
||||||
<literal>code.google.com/p/goprotobuf</literal> to
|
<literal>go.net</literal> library.
|
||||||
<literal>github.com/golang/protobuf</literal>.
|
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
@ -732,6 +732,18 @@ the following arguments are of special significance to the function:
|
|||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
|
<callout arearefs='ex-buildGoPackage-6'>
|
||||||
|
<para>
|
||||||
|
If <varname>disabled</varname> is <literal>true</literal>,
|
||||||
|
nix will refuse to build this package.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
In this example the package will not be built for go 1.3. The <literal>isGo13</literal>
|
||||||
|
is an utility function that returns <literal>true</literal> if go used to build the
|
||||||
|
package has version 1.3.x.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -513,8 +513,8 @@ script) if it exists.</para>
|
|||||||
<term><varname>dontAddPrefix</varname></term>
|
<term><varname>dontAddPrefix</varname></term>
|
||||||
<listitem><para>By default, the flag
|
<listitem><para>By default, the flag
|
||||||
<literal>--prefix=$prefix</literal> is added to the configure
|
<literal>--prefix=$prefix</literal> is added to the configure
|
||||||
flags. If this is undesirable, set this variable to a non-empty
|
flags. If this is undesirable, set this variable to
|
||||||
value.</para></listitem>
|
true.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -530,8 +530,7 @@ script) if it exists.</para>
|
|||||||
<listitem><para>By default, the flag
|
<listitem><para>By default, the flag
|
||||||
<literal>--disable-dependency-tracking</literal> is added to the
|
<literal>--disable-dependency-tracking</literal> is added to the
|
||||||
configure flags to speed up Automake-based builds. If this is
|
configure flags to speed up Automake-based builds. If this is
|
||||||
undesirable, set this variable to a non-empty
|
undesirable, set this variable to true.</para></listitem>
|
||||||
value.</para></listitem>
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -544,7 +543,16 @@ script) if it exists.</para>
|
|||||||
variables in the Libtool script to prevent Libtool from using
|
variables in the Libtool script to prevent Libtool from using
|
||||||
libraries in <filename>/usr/lib</filename> and
|
libraries in <filename>/usr/lib</filename> and
|
||||||
such.</para></footnote>. If this is undesirable, set this
|
such.</para></footnote>. If this is undesirable, set this
|
||||||
variable to a non-empty value.</para></listitem>
|
variable to true.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>dontDisableStatic</varname></term>
|
||||||
|
<listitem><para>By default, when the configure script has
|
||||||
|
<option>--enable-static</option>, the option
|
||||||
|
<option>--disable-static</option> is added to the configure flags.</para>
|
||||||
|
<para>If this is undesirable, set this variable to
|
||||||
|
true.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
bodil = "Bodil Stokke <nix@bodil.org>";
|
bodil = "Bodil Stokke <nix@bodil.org>";
|
||||||
boothead = "Ben Ford <ben@perurbis.com>";
|
boothead = "Ben Ford <ben@perurbis.com>";
|
||||||
bosu = "Boris Sukholitko <boriss@gmail.com>";
|
bosu = "Boris Sukholitko <boriss@gmail.com>";
|
||||||
|
bramd = "Bram Duvigneau <bram@bramd.nl>";
|
||||||
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
||||||
|
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>";
|
||||||
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
|
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
|
||||||
@ -115,6 +117,7 @@
|
|||||||
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
|
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
|
||||||
kragniz = "Louis Taylor <kragniz@gmail.com>";
|
kragniz = "Louis Taylor <kragniz@gmail.com>";
|
||||||
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
||||||
|
lassulus = "Lassulus <lassulus@gmail.com>";
|
||||||
lethalman = "Luca Bruno <lucabru@src.gnome.org>";
|
lethalman = "Luca Bruno <lucabru@src.gnome.org>";
|
||||||
lhvwb = "Nathaniel Baxter <nathaniel.baxter@gmail.com>";
|
lhvwb = "Nathaniel Baxter <nathaniel.baxter@gmail.com>";
|
||||||
linquize = "Linquize <linquize@yahoo.com.hk>";
|
linquize = "Linquize <linquize@yahoo.com.hk>";
|
||||||
@ -131,6 +134,7 @@
|
|||||||
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>";
|
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
||||||
|
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
|
||||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||||
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>";
|
||||||
@ -147,11 +151,14 @@
|
|||||||
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
|
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
|
||||||
olcai = "Erik Timan <dev@timan.info>";
|
olcai = "Erik Timan <dev@timan.info>";
|
||||||
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
||||||
|
osener = "Ozan Sener <ozan@ozansener.com>";
|
||||||
page = "Carles Pagès <page@cubata.homelinux.net>";
|
page = "Carles Pagès <page@cubata.homelinux.net>";
|
||||||
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
||||||
pakhfn = "Fedor Pakhomov <pakhfn@gmail.com>";
|
pakhfn = "Fedor Pakhomov <pakhfn@gmail.com>";
|
||||||
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
||||||
|
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
||||||
phausmann = "Philipp Hausmann <nix@314.ch>";
|
phausmann = "Philipp Hausmann <nix@314.ch>";
|
||||||
|
philandstuff = "Philip Potter <philip.g.potter@gmail.com>";
|
||||||
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
||||||
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
||||||
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
|
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
|
||||||
@ -159,6 +166,7 @@
|
|||||||
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>";
|
||||||
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
||||||
|
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
|
||||||
prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
|
prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
|
||||||
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
|
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
|
||||||
puffnfresh = "Brian McKenna <brian@brianmckenna.org>";
|
puffnfresh = "Brian McKenna <brian@brianmckenna.org>";
|
||||||
@ -182,6 +190,7 @@
|
|||||||
schmitthenner = "Fabian Schmitthenner <development@schmitthenner.eu>";
|
schmitthenner = "Fabian Schmitthenner <development@schmitthenner.eu>";
|
||||||
schristo = "Scott Christopher <schristopher@konputa.com>";
|
schristo = "Scott Christopher <schristopher@konputa.com>";
|
||||||
sepi = "Raffael Mancini <raffael@mancini.lu>";
|
sepi = "Raffael Mancini <raffael@mancini.lu>";
|
||||||
|
sheganinans = "Aistis Raulinaitis <sheganinans@gmail.com>";
|
||||||
shell = "Shell Turner <cam.turn@gmail.com>";
|
shell = "Shell Turner <cam.turn@gmail.com>";
|
||||||
shlevy = "Shea Levy <shea@shealevy.com>";
|
shlevy = "Shea Levy <shea@shealevy.com>";
|
||||||
simons = "Peter Simons <simons@cryp.to>";
|
simons = "Peter Simons <simons@cryp.to>";
|
||||||
@ -218,6 +227,7 @@
|
|||||||
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>";
|
||||||
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
||||||
|
@ -24,6 +24,9 @@ $ mkdir -p <replaceable>/my/sources</replaceable>
|
|||||||
$ cd <replaceable>/my/sources</replaceable>
|
$ cd <replaceable>/my/sources</replaceable>
|
||||||
$ nix-env -i git
|
$ nix-env -i git
|
||||||
$ git clone git://github.com/NixOS/nixpkgs.git
|
$ git clone git://github.com/NixOS/nixpkgs.git
|
||||||
|
$ cd nixpkgs
|
||||||
|
$ git remote add channels git://github.com/NixOS/nixpkgs-channels.git
|
||||||
|
$ git remote update channels
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
This will check out the latest NixOS sources to
|
This will check out the latest NixOS sources to
|
||||||
@ -31,7 +34,12 @@ This will check out the latest NixOS sources to
|
|||||||
and the Nixpkgs sources to
|
and the Nixpkgs sources to
|
||||||
<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
|
<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
|
||||||
(The NixOS source tree lives in a subdirectory of the Nixpkgs
|
(The NixOS source tree lives in a subdirectory of the Nixpkgs
|
||||||
repository.)</para>
|
repository.) The remote <literal>channels</literal> refers to a
|
||||||
|
read-only repository that tracks the Nixpkgs/NixOS channels (see <xref
|
||||||
|
linkend="sec-upgrading"/> for more information about channels). Thus,
|
||||||
|
the Git branch <literal>channels/nixos-14.12</literal> will contain
|
||||||
|
the latest built and tested version available in the
|
||||||
|
<literal>nixos-14.12</literal> channel.</para>
|
||||||
|
|
||||||
<para>It’s often inconvenient to develop directly on the master
|
<para>It’s often inconvenient to develop directly on the master
|
||||||
branch, since if somebody has just committed (say) a change to GCC,
|
branch, since if somebody has just committed (say) a change to GCC,
|
||||||
@ -40,28 +48,32 @@ rebuild everything from source. So you may want to create a local
|
|||||||
branch based on your current NixOS version:
|
branch based on your current NixOS version:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ <replaceable>/my/sources</replaceable>/nixpkgs/maintainers/scripts/update-channel-branches.sh
|
$ nixos-version
|
||||||
Fetching channels from https://nixos.org/channels:
|
14.04.273.ea1952b (Baboon)
|
||||||
* [new branch] cbe467e -> channels/remotes/nixos-unstable
|
|
||||||
Fetching channels from nixos-version:
|
$ git checkout -b local ea1952b
|
||||||
* [new branch] 9ff4738 -> channels/current-system
|
|
||||||
Fetching channels from ~/.nix-defexpr:
|
|
||||||
* [new branch] 0d4acad -> channels/root/nixos
|
|
||||||
$ git checkout -b local channels/current-system
|
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
Or, to base your local branch on the latest version available in the
|
Or, to base your local branch on the latest version available in a
|
||||||
NixOS channel:
|
NixOS channel:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ <replaceable>/my/sources</replaceable>/nixpkgs/maintainers/scripts/update-channel-branches.sh
|
$ git remote update channels
|
||||||
$ git checkout -b local channels/remotes/nixos-unstable
|
$ git checkout -b local channels/nixos-14.12
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
You can then use <command>git rebase</command> to sync your local
|
(Replace <literal>nixos-14.12</literal> with the name of the channel
|
||||||
branch with the upstream branch, and use <command>git
|
you want to use.) You can use <command>git merge</command> or
|
||||||
cherry-pick</command> to copy commits from your local branch to the
|
<command>git rebase</command> to keep your local branch in sync with
|
||||||
upstream branch.</para>
|
the channel, e.g.
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
$ git remote update channels
|
||||||
|
$ git merge channels/nixos-14.12
|
||||||
|
</screen>
|
||||||
|
|
||||||
|
You can use <command>git cherry-pick</command> to copy commits from
|
||||||
|
your local branch to the upstream branch.</para>
|
||||||
|
|
||||||
<para>If you want to rebuild your system using your (modified)
|
<para>If you want to rebuild your system using your (modified)
|
||||||
sources, you need to tell <command>nixos-rebuild</command> about them
|
sources, you need to tell <command>nixos-rebuild</command> about them
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
|
|
||||||
<para>Following new services were added since the last release:
|
<para>Following new services were added since the last release:
|
||||||
|
|
||||||
<!--<itemizedlist>
|
<itemizedlist>
|
||||||
|
<listitem><para><literal>brltty</literal></para></listitem>
|
||||||
</itemizedlist>-->
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>When upgrading from a previous release, please be aware of the
|
<para>When upgrading from a previous release, please be aware of the
|
||||||
@ -49,6 +49,28 @@ was accordingly renamed to <literal>bomi</literal>
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CUPS printing service has been updated to version <literal>2.0.2</literal>.
|
||||||
|
Furthermore its systemd service has been renamed to <literal>cups.service</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Local printers are no longer shared or advertised by default. This behavior
|
||||||
|
can be changed by enabling <literal>services.printing.defaultShared</literal>
|
||||||
|
or <literal>services.printing.browsing</literal> respectively.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
HPLIP (printer, scanner, and fax drivers for HP devices) has
|
||||||
|
been updated to version <literal>3.15.4</literal>. This release
|
||||||
|
adds support for the <literal>arm6l-linux</literal> and
|
||||||
|
<literal>arm7l-linux</literal> platforms.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
isoImage.isoName = mkOption {
|
isoImage.isoName = mkOption {
|
||||||
default = "${config.isoImage.isoName}.iso";
|
default = "${config.isoImage.isoBaseName}.iso";
|
||||||
description = ''
|
description = ''
|
||||||
Name of the generated ISO image file.
|
Name of the generated ISO image file.
|
||||||
'';
|
'';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# This module generates the nixos-checkout script, which replaces the
|
# This module generates the nixos-checkout script, which performs a
|
||||||
# Nixpkgs source trees in /etc/nixos/nixpkgs with a Git checkout.
|
# checkout of the Nixpkgs Git repository.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
@ -37,8 +37,19 @@ let
|
|||||||
mv nixpkgs nixpkgs-$backupTimestamp
|
mv nixpkgs nixpkgs-$backupTimestamp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check out the NixOS and Nixpkgs sources.
|
# Check out the Nixpkgs sources.
|
||||||
git clone git://github.com/NixOS/nixpkgs.git nixpkgs
|
if ! [ -e nixpkgs/.git ]; then
|
||||||
|
echo "Creating repository in $prefix/nixpkgs..."
|
||||||
|
git init --quiet nixpkgs
|
||||||
|
else
|
||||||
|
echo "Updating repository in $prefix/nixpkgs..."
|
||||||
|
fi
|
||||||
|
cd nixpkgs
|
||||||
|
git remote add origin git://github.com/NixOS/nixpkgs.git || true
|
||||||
|
git remote add channels git://github.com/NixOS/nixpkgs-channels.git || true
|
||||||
|
git remote set-url origin --push git@github.com:NixOS/nixpkgs.git
|
||||||
|
git remote update
|
||||||
|
git checkout master
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ EOF
|
|||||||
if ($fsType eq "btrfs") {
|
if ($fsType eq "btrfs") {
|
||||||
my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
|
my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
|
||||||
if ($status != 0 || join("", @msg) =~ /ERROR:/) {
|
if ($status != 0 || join("", @msg) =~ /ERROR:/) {
|
||||||
die "Failed to retreive subvolume info for $mountPoint\n";
|
die "Failed to retrieve subvolume info for $mountPoint\n";
|
||||||
}
|
}
|
||||||
my @ids = join("", @id_info) =~ m/Object ID:[ \t\n]*([^ \t\n]*)/;
|
my @ids = join("", @id_info) =~ m/Object ID:[ \t\n]*([^ \t\n]*)/;
|
||||||
if ($#ids > 0) {
|
if ($#ids > 0) {
|
||||||
|
@ -263,7 +263,7 @@ export NIX_PATH=$NIX_PATH:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix
|
|||||||
|
|
||||||
|
|
||||||
# Ask the user to set a root password.
|
# Ask the user to set a root password.
|
||||||
if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 1 ] ; then
|
if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 0 ] ; then
|
||||||
echo "setting root password..."
|
echo "setting root password..."
|
||||||
chroot $mountPoint /var/setuid-wrappers/passwd
|
chroot $mountPoint /var/setuid-wrappers/passwd
|
||||||
fi
|
fi
|
||||||
|
@ -411,6 +411,7 @@
|
|||||||
lambdabot = 191;
|
lambdabot = 191;
|
||||||
#asterisk = 192; # unused
|
#asterisk = 192; # unused
|
||||||
plex = 193;
|
plex = 193;
|
||||||
|
sabnzbd = 194;
|
||||||
|
|
||||||
# When adding a gid, make sure it doesn't match an existing
|
# When adding a gid, make sure it doesn't match an existing
|
||||||
# uid. Users and groups with the same name should have equal
|
# uid. Users and groups with the same name should have equal
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
./programs/environment.nix
|
./programs/environment.nix
|
||||||
./programs/info.nix
|
./programs/info.nix
|
||||||
./programs/ibus.nix
|
./programs/ibus.nix
|
||||||
|
./programs/kbdlight.nix
|
||||||
./programs/light.nix
|
./programs/light.nix
|
||||||
./programs/nano.nix
|
./programs/nano.nix
|
||||||
./programs/screen.nix
|
./programs/screen.nix
|
||||||
@ -152,6 +153,7 @@
|
|||||||
./services/hardware/actkbd.nix
|
./services/hardware/actkbd.nix
|
||||||
./services/hardware/amd-hybrid-graphics.nix
|
./services/hardware/amd-hybrid-graphics.nix
|
||||||
./services/hardware/bluetooth.nix
|
./services/hardware/bluetooth.nix
|
||||||
|
./services/hardware/brltty.nix
|
||||||
./services/hardware/freefall.nix
|
./services/hardware/freefall.nix
|
||||||
./services/hardware/nvidia-optimus.nix
|
./services/hardware/nvidia-optimus.nix
|
||||||
./services/hardware/pcscd.nix
|
./services/hardware/pcscd.nix
|
||||||
@ -185,6 +187,7 @@
|
|||||||
./services/misc/canto-daemon.nix
|
./services/misc/canto-daemon.nix
|
||||||
./services/misc/cpuminer-cryptonight.nix
|
./services/misc/cpuminer-cryptonight.nix
|
||||||
./services/misc/cgminer.nix
|
./services/misc/cgminer.nix
|
||||||
|
./services/misc/confd.nix
|
||||||
./services/misc/dictd.nix
|
./services/misc/dictd.nix
|
||||||
./services/misc/disnix.nix
|
./services/misc/disnix.nix
|
||||||
./services/misc/docker-registry.nix
|
./services/misc/docker-registry.nix
|
||||||
@ -195,6 +198,7 @@
|
|||||||
./services/misc/gitolite.nix
|
./services/misc/gitolite.nix
|
||||||
./services/misc/gpsd.nix
|
./services/misc/gpsd.nix
|
||||||
./services/misc/ihaskell.nix
|
./services/misc/ihaskell.nix
|
||||||
|
./services/misc/mbpfan.nix
|
||||||
./services/misc/mediatomb.nix
|
./services/misc/mediatomb.nix
|
||||||
./services/misc/mesos-master.nix
|
./services/misc/mesos-master.nix
|
||||||
./services/misc/mesos-slave.nix
|
./services/misc/mesos-slave.nix
|
||||||
@ -250,6 +254,7 @@
|
|||||||
./services/networking/bind.nix
|
./services/networking/bind.nix
|
||||||
./services/networking/bitlbee.nix
|
./services/networking/bitlbee.nix
|
||||||
./services/networking/btsync.nix
|
./services/networking/btsync.nix
|
||||||
|
./services/networking/charybdis.nix
|
||||||
./services/networking/chrony.nix
|
./services/networking/chrony.nix
|
||||||
./services/networking/cjdns.nix
|
./services/networking/cjdns.nix
|
||||||
./services/networking/cntlm.nix
|
./services/networking/cntlm.nix
|
||||||
@ -285,6 +290,7 @@
|
|||||||
./services/networking/nat.nix
|
./services/networking/nat.nix
|
||||||
./services/networking/networkmanager.nix
|
./services/networking/networkmanager.nix
|
||||||
./services/networking/ngircd.nix
|
./services/networking/ngircd.nix
|
||||||
|
./services/networking/nix-serve.nix
|
||||||
./services/networking/notbit.nix
|
./services/networking/notbit.nix
|
||||||
./services/networking/nsd.nix
|
./services/networking/nsd.nix
|
||||||
./services/networking/ntopng.nix
|
./services/networking/ntopng.nix
|
||||||
@ -457,5 +463,6 @@
|
|||||||
./virtualisation/openvswitch.nix
|
./virtualisation/openvswitch.nix
|
||||||
./virtualisation/parallels-guest.nix
|
./virtualisation/parallels-guest.nix
|
||||||
./virtualisation/virtualbox-guest.nix
|
./virtualisation/virtualbox-guest.nix
|
||||||
|
./virtualisation/vmware-guest.nix
|
||||||
./virtualisation/xen-dom0.nix
|
./virtualisation/xen-dom0.nix
|
||||||
]
|
]
|
||||||
|
16
nixos/modules/programs/kbdlight.nix
Normal file
16
nixos/modules/programs/kbdlight.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.programs.kbdlight;
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.kbdlight.enable = mkEnableOption "kbdlight";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.kbdlight ];
|
||||||
|
security.setuidPrograms = [ "kbdlight" ];
|
||||||
|
};
|
||||||
|
}
|
@ -38,7 +38,7 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Enable the testing grsecurity patch, based on Linux 3.19.
|
Enable the testing grsecurity patch, based on Linux 4.0.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ in
|
|||||||
message = ''
|
message = ''
|
||||||
If grsecurity is enabled, you must select either the
|
If grsecurity is enabled, you must select either the
|
||||||
stable patch (with kernel 3.14), or the testing patch (with
|
stable patch (with kernel 3.14), or the testing patch (with
|
||||||
kernel 3.19) to continue.
|
kernel 4.0) to continue.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{ assertion = !(cfg.stable && cfg.testing);
|
{ assertion = !(cfg.stable && cfg.testing);
|
||||||
|
@ -36,6 +36,16 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
u2fAuth = mkOption {
|
||||||
|
default = config.security.pam.enableU2F;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
If set, users listed in
|
||||||
|
<filename>~/.yubico/u2f_keys</filename> are able to log in
|
||||||
|
with the associated U2F key.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
usbAuth = mkOption {
|
usbAuth = mkOption {
|
||||||
default = config.security.pam.usb.enable;
|
default = config.security.pam.usb.enable;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@ -209,6 +219,8 @@ let
|
|||||||
"auth sufficient ${pkgs.pam_ssh_agent_auth}/libexec/pam_ssh_agent_auth.so file=~/.ssh/authorized_keys:~/.ssh/authorized_keys2:/etc/ssh/authorized_keys.d/%u"}
|
"auth sufficient ${pkgs.pam_ssh_agent_auth}/libexec/pam_ssh_agent_auth.so file=~/.ssh/authorized_keys:~/.ssh/authorized_keys2:/etc/ssh/authorized_keys.d/%u"}
|
||||||
${optionalString cfg.fprintAuth
|
${optionalString cfg.fprintAuth
|
||||||
"auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so"}
|
"auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so"}
|
||||||
|
${optionalString cfg.u2fAuth
|
||||||
|
"auth sufficient ${pkgs.pam_u2f}/lib/security/pam_u2f.so"}
|
||||||
${optionalString cfg.usbAuth
|
${optionalString cfg.usbAuth
|
||||||
"auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so"}
|
"auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so"}
|
||||||
${optionalString cfg.unixAuth
|
${optionalString cfg.unixAuth
|
||||||
@ -364,6 +376,13 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.pam.enableU2F = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable the U2F PAM module.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
security.pam.enableEcryptfs = mkOption {
|
security.pam.enableEcryptfs = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
@ -392,6 +411,7 @@ in
|
|||||||
++ 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.enableOATH [ pkgs.oathToolkit ]
|
||||||
|
++ optionals config.security.pam.enableU2F [ pkgs.pam_u2f ]
|
||||||
++ optionals config.security.pam.enableEcryptfs [ pkgs.ecryptfs ];
|
++ optionals config.security.pam.enableEcryptfs [ pkgs.ecryptfs ];
|
||||||
|
|
||||||
security.setuidPrograms =
|
security.setuidPrograms =
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) postgresql gzip;
|
inherit (pkgs) gzip;
|
||||||
|
|
||||||
location = config.services.postgresqlBackup.location ;
|
location = config.services.postgresqlBackup.location;
|
||||||
|
|
||||||
postgresqlBackupCron = db:
|
postgresqlBackupCron = db:
|
||||||
''
|
''
|
||||||
${config.services.postgresqlBackup.period} root ${postgresql}/bin/pg_dump ${db} | ${gzip}/bin/gzip -c > ${location}/${db}.gz
|
${config.services.postgresqlBackup.period} root ${config.services.postgresql.package}/bin/pg_dump ${db} | ${gzip}/bin/gzip -c > ${location}/${db}.gz
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -249,6 +249,8 @@ in
|
|||||||
script = ''
|
script = ''
|
||||||
mkdir -p -m 0755 ${dirOf cfg.cachedir}
|
mkdir -p -m 0755 ${dirOf cfg.cachedir}
|
||||||
mkdir -p -m 0700 ${cfg.cachedir}
|
mkdir -p -m 0700 ${cfg.cachedir}
|
||||||
|
chown root:root ${cfg.cachedir}
|
||||||
|
chmod 0700 ${cfg.cachedir}
|
||||||
DIRS=`cat /etc/tarsnap/$1.dirs`
|
DIRS=`cat /etc/tarsnap/$1.dirs`
|
||||||
exec tarsnap --configfile /etc/tarsnap/$1.conf -c -f $1-$(date +"%Y%m%d%H%M%S") $DIRS
|
exec tarsnap --configfile /etc/tarsnap/$1.conf -c -f $1-$(date +"%Y%m%d%H%M%S") $DIRS
|
||||||
'';
|
'';
|
||||||
|
@ -176,11 +176,11 @@ in
|
|||||||
touch /tmp/mysql_init
|
touch /tmp/mysql_init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -m 0700 -p ${cfg.pidDir}
|
mkdir -m 0755 -p ${cfg.pidDir}
|
||||||
chown -R ${cfg.user} ${cfg.pidDir}
|
chown -R ${cfg.user} ${cfg.pidDir}
|
||||||
|
|
||||||
# Make the socket directory
|
# Make the socket directory
|
||||||
mkdir -m 0700 -p /run/mysqld
|
mkdir -m 0755 -p /run/mysqld
|
||||||
chown -R ${cfg.user} /run/mysqld
|
chown -R ${cfg.user} /run/mysqld
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ with lib;
|
|||||||
|
|
||||||
services.dbus.packages = [ pkgs.geoclue2 ];
|
services.dbus.packages = [ pkgs.geoclue2 ];
|
||||||
|
|
||||||
|
systemd.packages = [ pkgs.geoclue2 ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
42
nixos/modules/services/hardware/brltty.nix
Normal file
42
nixos/modules/services/hardware/brltty.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.brltty;
|
||||||
|
|
||||||
|
stateDir = "/run/brltty";
|
||||||
|
|
||||||
|
pidFile = "${stateDir}/brltty.pid";
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.brltty.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the BRLTTY daemon.";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
systemd.services.brltty = {
|
||||||
|
description = "Braille console driver";
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p ${stateDir}
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}";
|
||||||
|
Type = "forking";
|
||||||
|
PIDFile = pidFile;
|
||||||
|
};
|
||||||
|
before = [ "sysinit.target" ];
|
||||||
|
wantedBy = [ "sysinit.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -265,7 +265,7 @@ in
|
|||||||
extraAliases = mkOption {
|
extraAliases = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
description = "
|
description = "
|
||||||
Additional entries to put verbatim into aliases file.
|
Additional entries to put verbatim into aliases file, cf. man-page aliases(8).
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ in
|
|||||||
virtual = mkOption {
|
virtual = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
description = "
|
description = "
|
||||||
Entries for the virtual alias map.
|
Entries for the virtual alias map, cf. man-page virtual(8).
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
89
nixos/modules/services/misc/confd.nix
Normal file
89
nixos/modules/services/misc/confd.nix
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.confd;
|
||||||
|
|
||||||
|
confdConfig = ''
|
||||||
|
backend = "${cfg.backend}"
|
||||||
|
confdir = "${cfg.confDir}"
|
||||||
|
interval = ${toString cfg.interval}
|
||||||
|
nodes = [ ${concatMapStringsSep "," (s: ''"${s}"'') cfg.nodes}, ]
|
||||||
|
prefix = "${cfg.prefix}"
|
||||||
|
log-level = "${cfg.logLevel}"
|
||||||
|
watch = ${if cfg.watch then "true" else "false"}
|
||||||
|
'';
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.services.confd = {
|
||||||
|
enable = mkEnableOption "Whether to enable confd service.";
|
||||||
|
|
||||||
|
backend = mkOption {
|
||||||
|
description = "Confd config storage backend to use.";
|
||||||
|
default = "etcd";
|
||||||
|
type = types.enum ["etcd" "consul" "redis" "zookeeper"];
|
||||||
|
};
|
||||||
|
|
||||||
|
interval = mkOption {
|
||||||
|
description = "Confd check interval.";
|
||||||
|
default = 10;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = mkOption {
|
||||||
|
description = "Confd list of nodes to connect to.";
|
||||||
|
default = [ "http://127.0.0.1:4001" ];
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
watch = mkOption {
|
||||||
|
description = "Confd, whether to watch etcd config for changes.";
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
prefix = mkOption {
|
||||||
|
description = "The string to prefix to keys.";
|
||||||
|
default = "/";
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
logLevel = mkOption {
|
||||||
|
description = "Confd log level.";
|
||||||
|
default = "info";
|
||||||
|
type = types.enum ["info" "debug"];
|
||||||
|
};
|
||||||
|
|
||||||
|
confDir = mkOption {
|
||||||
|
description = "The path to the confd configs.";
|
||||||
|
default = "/etc/confd";
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
description = "Confd package to use.";
|
||||||
|
default = pkgs.goPackages.confd;
|
||||||
|
type = types.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.confd = {
|
||||||
|
description = "Confd Service.";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${cfg.package}/bin/confd";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"confd/confd.toml".text = confdConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
|
services.etcd.enable = mkIf (cfg.backend == "etcd") (mkDefault true);
|
||||||
|
};
|
||||||
|
}
|
113
nixos/modules/services/misc/mbpfan.nix
Normal file
113
nixos/modules/services/misc/mbpfan.nix
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.mbpfan;
|
||||||
|
verbose = if cfg.verbose then "v" else "";
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.services.mbpfan = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to enable the mbpfan daemon.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
default = pkgs.mbpfan;
|
||||||
|
description = ''
|
||||||
|
The package used for the mbpfan daemon.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
minFanSpeed = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 2000;
|
||||||
|
description = ''
|
||||||
|
The minimum fan speed.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
maxFanSpeed = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 6200;
|
||||||
|
description = ''
|
||||||
|
The maximum fan speed.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
lowTemp = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 63;
|
||||||
|
description = ''
|
||||||
|
The low temperature.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
highTemp = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 66;
|
||||||
|
description = ''
|
||||||
|
The high temperature.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
maxTemp = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 86;
|
||||||
|
description = ''
|
||||||
|
The maximum temperature.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
pollingInterval = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 7;
|
||||||
|
description = ''
|
||||||
|
The polling interval.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
verbose = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
If true, sets the log level to verbose.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
boot.kernelModules = [ "coretemp" "applesmc" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
etc."mbpfan.conf".text = ''
|
||||||
|
[general]
|
||||||
|
min_fan_speed = ${toString cfg.minFanSpeed}
|
||||||
|
max_fan_speed = ${toString cfg.maxFanSpeed}
|
||||||
|
low_temp = ${toString cfg.lowTemp}
|
||||||
|
high_temp = ${toString cfg.highTemp}
|
||||||
|
max_temp = ${toString cfg.maxTemp}
|
||||||
|
polling_interval = ${toString cfg.pollingInterval}
|
||||||
|
'';
|
||||||
|
systemPackages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.mbpfan = {
|
||||||
|
description = "A fan manager daemon for MacBook Pro";
|
||||||
|
wantedBy = [ "sysinit.target" ];
|
||||||
|
after = [ "syslog.target" "sysinit.target" ];
|
||||||
|
restartTriggers = [ config.environment.etc."mbpfan.conf".source ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${cfg.package}/bin/mbpfan -f${verbose}";
|
||||||
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
PIDFile = "/var/run/mbpfan.pid";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -40,10 +40,10 @@ in {
|
|||||||
|
|
||||||
extraCmdLineOptions = mkOption {
|
extraCmdLineOptions = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Extra command line options for Mesos Master.
|
Extra command line options for Mesos Master.
|
||||||
|
|
||||||
See https://mesos.apache.org/documentation/latest/configuration/
|
See https://mesos.apache.org/documentation/latest/configuration/
|
||||||
'';
|
'';
|
||||||
default = [ "" ];
|
default = [ "" ];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.string;
|
||||||
example = [ "--credentials=VALUE" ];
|
example = [ "--credentials=VALUE" ];
|
||||||
@ -82,20 +82,21 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-interfaces.target" ];
|
after = [ "network-interfaces.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.mesos}/bin/mesos-master \
|
${pkgs.mesos}/bin/mesos-master \
|
||||||
--port=${toString cfg.port} \
|
--port=${toString cfg.port} \
|
||||||
--zk=${cfg.zk} \
|
${if cfg.quorum == 0
|
||||||
${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${toString cfg.quorum}"} \
|
then "--registry=in_memory"
|
||||||
--work_dir=${cfg.workDir} \
|
else "--zk=${cfg.zk} --registry=replicated_log --quorum=${toString cfg.quorum}"} \
|
||||||
--logging_level=${cfg.logLevel} \
|
--work_dir=${cfg.workDir} \
|
||||||
${toString cfg.extraCmdLineOptions}
|
--logging_level=${cfg.logLevel} \
|
||||||
'';
|
${toString cfg.extraCmdLineOptions}
|
||||||
Restart = "on-failure";
|
'';
|
||||||
PermissionsStartOnly = true;
|
Restart = "on-failure";
|
||||||
|
PermissionsStartOnly = true;
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -m 0700 -p ${cfg.workDir}
|
mkdir -m 0700 -p ${cfg.workDir}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -30,6 +30,30 @@ in
|
|||||||
default = "plex";
|
default = "plex";
|
||||||
description = "Group under which Plex runs.";
|
description = "Group under which Plex runs.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
managePlugins = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
If set to true, this option will cause all of the symlinks in Plex's
|
||||||
|
plugin directory to be removed and symlinks for paths specified in
|
||||||
|
<option>extraPlugins</option> to be added.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPlugins = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
A list of paths to extra plugin bundles to install in Plex's plugin
|
||||||
|
directory. Every time the systemd unit for Plex starts up, all of the
|
||||||
|
symlinks in Plex's plugin directory will be cleared and this module
|
||||||
|
will symlink all of the paths specified here to that directory. If
|
||||||
|
this behavior is undesired, set <option>managePlugins</option> to
|
||||||
|
false.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -45,13 +69,48 @@ in
|
|||||||
mkdir -p "${cfg.dataDir}"
|
mkdir -p "${cfg.dataDir}"
|
||||||
chown -R ${cfg.user}:${cfg.group} "${cfg.dataDir}"
|
chown -R ${cfg.user}:${cfg.group} "${cfg.dataDir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copy the database skeleton files to /var/lib/plex/.skeleton
|
# Copy the database skeleton files to /var/lib/plex/.skeleton
|
||||||
|
# See the the Nix expression for Plex's package for more information on
|
||||||
|
# why this is done.
|
||||||
test -d "${cfg.dataDir}/.skeleton" || mkdir "${cfg.dataDir}/.skeleton"
|
test -d "${cfg.dataDir}/.skeleton" || mkdir "${cfg.dataDir}/.skeleton"
|
||||||
for db in "com.plexapp.plugins.library.db"; do
|
for db in "com.plexapp.plugins.library.db"; do
|
||||||
cp "${plex}/usr/lib/plexmediaserver/Resources/base_$db" "${cfg.dataDir}/.skeleton/$db"
|
cp "${plex}/usr/lib/plexmediaserver/Resources/base_$db" "${cfg.dataDir}/.skeleton/$db"
|
||||||
chmod u+w "${cfg.dataDir}/.skeleton/$db"
|
chmod u+w "${cfg.dataDir}/.skeleton/$db"
|
||||||
chown ${cfg.user}:${cfg.group} "${cfg.dataDir}/.skeleton/$db"
|
chown ${cfg.user}:${cfg.group} "${cfg.dataDir}/.skeleton/$db"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# If managePlugins is enabled, setup symlinks for plugins.
|
||||||
|
${optionalString cfg.managePlugins ''
|
||||||
|
echo "Preparing plugin directory."
|
||||||
|
PLUGINDIR="${cfg.dataDir}/Plex Media Server/Plug-ins"
|
||||||
|
test -d "$PLUGINDIR" || {
|
||||||
|
mkdir -p "$PLUGINDIR";
|
||||||
|
chown ${cfg.user}:${cfg.group} "$PLUGINDIR";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Removing old symlinks."
|
||||||
|
# First, remove all of the symlinks in the directory.
|
||||||
|
for f in `ls "$PLUGINDIR/"`; do
|
||||||
|
if [[ -L "$PLUGINDIR/$f" ]]; then
|
||||||
|
echo "Removing plugin symlink $PLUGINDIR/$f."
|
||||||
|
rm "$PLUGINDIR/$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Symlinking plugins."
|
||||||
|
for path in ${toString cfg.extraPlugins}; do
|
||||||
|
dest="$PLUGINDIR/$(basename $path)"
|
||||||
|
if [[ ! -d "$path" ]]; then
|
||||||
|
echo "Error symlinking plugin from $path: no such directory."
|
||||||
|
elif [[ -d "$dest" || -L "$dest" ]]; then
|
||||||
|
echo "Error symlinking plugin from $path to $dest: file or directory already exists."
|
||||||
|
else
|
||||||
|
echo "Symlinking plugin at $path..."
|
||||||
|
ln -s "$path" "$dest"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
''}
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
|
98
nixos/modules/services/networking/charybdis.nix
Normal file
98
nixos/modules/services/networking/charybdis.nix
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption singleton types;
|
||||||
|
inherit (pkgs) coreutils charybdis;
|
||||||
|
cfg = config.services.charybdis;
|
||||||
|
|
||||||
|
configFile = pkgs.writeText "charybdis.conf" ''
|
||||||
|
${cfg.config}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.charybdis = {
|
||||||
|
|
||||||
|
enable = mkEnableOption "Charybdis IRC daemon";
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
description = ''
|
||||||
|
Charybdis IRC daemon configuration file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
statedir = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "/var/lib/charybdis";
|
||||||
|
description = ''
|
||||||
|
Location of the state directory of charybdis.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "ircd";
|
||||||
|
description = ''
|
||||||
|
Charybdis IRC daemon user.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
group = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "ircd";
|
||||||
|
description = ''
|
||||||
|
Charybdis IRC daemon group.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
users.extraUsers = singleton {
|
||||||
|
name = cfg.user;
|
||||||
|
description = "Charybdis IRC daemon user";
|
||||||
|
uid = config.ids.uids.ircd;
|
||||||
|
group = cfg.group;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraGroups = singleton {
|
||||||
|
name = cfg.group;
|
||||||
|
gid = config.ids.gids.ircd;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.charybdis = {
|
||||||
|
description = "Charybdis IRC daemon";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
environment = {
|
||||||
|
BANDB_DBPATH = "${cfg.statedir}/ban.db";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${charybdis}/bin/charybdis-ircd -foreground -logfile /dev/stdout -configfile ${configFile}";
|
||||||
|
Group = cfg.group;
|
||||||
|
User = cfg.user;
|
||||||
|
PermissionsStartOnly = true; # preStart needs to run with root permissions
|
||||||
|
};
|
||||||
|
preStart = ''
|
||||||
|
if ! test -d /var/lib/charybdis; then
|
||||||
|
${coreutils}/bin/mkdir -p ${cfg.statedir}
|
||||||
|
${coreutils}/bin/chown ${cfg.user}:${cfg.group} ${cfg.statedir}
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -6,11 +6,9 @@ let
|
|||||||
dataDir = "/var/lib/consul";
|
dataDir = "/var/lib/consul";
|
||||||
cfg = config.services.consul;
|
cfg = config.services.consul;
|
||||||
|
|
||||||
configOptions = {
|
configOptions = { data_dir = dataDir; } //
|
||||||
data_dir = dataDir;
|
(if cfg.webUi then { ui_dir = "${pkgs.consul.ui}"; } else { }) //
|
||||||
}
|
cfg.extraConfig;
|
||||||
// (if cfg.webUi then { ui_dir = "${pkgs.consul.ui}"; } else { })
|
|
||||||
// cfg.extraConfig;
|
|
||||||
|
|
||||||
configFiles = [ "/etc/consul.json" "/etc/consul-addrs.json" ]
|
configFiles = [ "/etc/consul.json" "/etc/consul-addrs.json" ]
|
||||||
++ cfg.extraConfigFiles;
|
++ cfg.extraConfigFiles;
|
||||||
@ -52,23 +50,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
joinNodes = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
description = ''
|
|
||||||
A list of addresses of nodes which should be joined at startup if the
|
|
||||||
current node is in a left state.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
joinRetries = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 10;
|
|
||||||
description = ''
|
|
||||||
The number of times to retry connecting to the join nodes.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
interface = {
|
interface = {
|
||||||
|
|
||||||
advertise = mkOption {
|
advertise = mkOption {
|
||||||
@ -159,10 +140,14 @@ in
|
|||||||
users.extraUsers."consul" = {
|
users.extraUsers."consul" = {
|
||||||
description = "Consul agent daemon user";
|
description = "Consul agent daemon user";
|
||||||
uid = config.ids.uids.consul;
|
uid = config.ids.uids.consul;
|
||||||
|
# The shell is needed for health checks
|
||||||
|
shell = "/run/current-system/sw/bin/bash";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
etc."consul.json".text = builtins.toJSON configOptions;
|
etc."consul.json".text = builtins.toJSON configOptions;
|
||||||
|
# We need consul.d to exist for consul to start
|
||||||
|
etc."consul.d/dummy.json".text = "{ }";
|
||||||
systemPackages = with pkgs; [ consul ];
|
systemPackages = with pkgs; [ consul ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -170,10 +155,12 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ] ++ systemdDevices;
|
after = [ "network.target" ] ++ systemdDevices;
|
||||||
bindsTo = systemdDevices;
|
bindsTo = systemdDevices;
|
||||||
restartTriggers = [ config.environment.etc."consul.json".source ];
|
restartTriggers = [ config.environment.etc."consul.json".source ]
|
||||||
|
++ mapAttrsToList (_: d: d.source)
|
||||||
|
(filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc);
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "@${pkgs.consul}/bin/consul consul agent"
|
ExecStart = "@${pkgs.consul}/bin/consul consul agent -config-dir /etc/consul.d"
|
||||||
+ concatMapStrings (n: " -config-file ${n}") configFiles;
|
+ concatMapStrings (n: " -config-file ${n}") configFiles;
|
||||||
ExecReload = "${pkgs.consul}/bin/consul reload";
|
ExecReload = "${pkgs.consul}/bin/consul reload";
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
@ -219,18 +206,6 @@ in
|
|||||||
+ ''
|
+ ''
|
||||||
echo "}" >> /etc/consul-addrs.json
|
echo "}" >> /etc/consul-addrs.json
|
||||||
'';
|
'';
|
||||||
postStart = ''
|
|
||||||
# Issues joins to nodes which we statically connect to
|
|
||||||
${flip concatMapStrings cfg.joinNodes (addr: ''
|
|
||||||
for i in {0..${toString cfg.joinRetries}}; do
|
|
||||||
# Try to join the other nodes ${toString cfg.joinRetries} times before failing
|
|
||||||
consul join "${addr}" && break
|
|
||||||
sleep 1
|
|
||||||
done &
|
|
||||||
'')}
|
|
||||||
wait
|
|
||||||
exit 0
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.consul-alerts = mkIf (cfg.alerts.enable) {
|
systemd.services.consul-alerts = mkIf (cfg.alerts.enable) {
|
||||||
|
@ -98,13 +98,23 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Ugly hack for using the correct gnome3 packageSet
|
||||||
|
basePackages = mkOption {
|
||||||
|
type = types.attrsOf types.path;
|
||||||
|
default = { inherit networkmanager modemmanager wpa_supplicant
|
||||||
|
networkmanager_openvpn networkmanager_vpnc
|
||||||
|
networkmanager_openconnect
|
||||||
|
networkmanager_pptp networkmanager_l2tp; };
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
Extra packages that provide NetworkManager plugins.
|
Extra packages that provide NetworkManager plugins.
|
||||||
'';
|
'';
|
||||||
apply = list: [ networkmanager modemmanager wpa_supplicant ] ++ list;
|
apply = list: (attrValues cfg.basePackages) ++ list;
|
||||||
};
|
};
|
||||||
|
|
||||||
appendNameservers = mkOption {
|
appendNameservers = mkOption {
|
||||||
@ -164,7 +174,7 @@ in {
|
|||||||
|
|
||||||
boot.kernelModules = [ "ppp_mppe" ]; # Needed for most (all?) PPTP VPN connections.
|
boot.kernelModules = [ "ppp_mppe" ]; # Needed for most (all?) PPTP VPN connections.
|
||||||
|
|
||||||
environment.etc = [
|
environment.etc = with cfg.basePackages; [
|
||||||
{ source = ipUpScript;
|
{ source = ipUpScript;
|
||||||
target = "NetworkManager/dispatcher.d/01nixos-ip-up";
|
target = "NetworkManager/dispatcher.d/01nixos-ip-up";
|
||||||
}
|
}
|
||||||
@ -195,14 +205,7 @@ in {
|
|||||||
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
|
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
|
||||||
}) cfg.dispatcherScripts;
|
}) cfg.dispatcherScripts;
|
||||||
|
|
||||||
environment.systemPackages = cfg.packages ++ [
|
environment.systemPackages = cfg.packages;
|
||||||
networkmanager_openvpn
|
|
||||||
networkmanager_vpnc
|
|
||||||
networkmanager_openconnect
|
|
||||||
networkmanager_pptp
|
|
||||||
networkmanager_l2tp
|
|
||||||
modemmanager
|
|
||||||
];
|
|
||||||
|
|
||||||
users.extraGroups = singleton {
|
users.extraGroups = singleton {
|
||||||
name = "networkmanager";
|
name = "networkmanager";
|
||||||
@ -238,15 +241,7 @@ in {
|
|||||||
|
|
||||||
security.polkit.extraConfig = polkitConf;
|
security.polkit.extraConfig = polkitConf;
|
||||||
|
|
||||||
# openvpn plugin has only dbus interface
|
services.dbus.packages = cfg.packages;
|
||||||
services.dbus.packages = cfg.packages ++ [
|
|
||||||
networkmanager_openvpn
|
|
||||||
networkmanager_vpnc
|
|
||||||
networkmanager_openconnect
|
|
||||||
networkmanager_pptp
|
|
||||||
networkmanager_l2tp
|
|
||||||
modemmanager
|
|
||||||
];
|
|
||||||
|
|
||||||
services.udev.packages = cfg.packages;
|
services.udev.packages = cfg.packages;
|
||||||
};
|
};
|
||||||
|
56
nixos/modules/services/networking/nix-serve.nix
Normal file
56
nixos/modules/services/networking/nix-serve.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.nix-serve;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.nix-serve = {
|
||||||
|
enable = mkEnableOption "nix-serve, the standalone Nix binary cache server";
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 5000;
|
||||||
|
description = ''
|
||||||
|
Port number where nix-serve will listen on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
bindAddress = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "0.0.0.0";
|
||||||
|
description = ''
|
||||||
|
IP address where nix-serve will bind its listening socket.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraParams = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Extra command line parameters for nix-serve.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.nix-serve = {
|
||||||
|
description = "nix-serve binary cache server";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
path = [ config.nix.package pkgs.bzip2 ];
|
||||||
|
environment.NIX_REMOTE = "daemon";
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.nix-serve}/bin/nix-serve " +
|
||||||
|
"--port ${cfg.bindAddress}:${toString cfg.port} ${cfg.extraParams}";
|
||||||
|
User = "nobody";
|
||||||
|
Group = "nogroup";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -17,11 +17,21 @@ in
|
|||||||
services.sabnzbd = {
|
services.sabnzbd = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the sabnzbd FTP server.";
|
description = "Whether to enable the sabnzbd server.";
|
||||||
};
|
};
|
||||||
configFile = mkOption {
|
configFile = mkOption {
|
||||||
default = "/var/sabnzbd/sabnzbd.ini";
|
default = "/var/lib/sabnzbd/sabnzbd.ini";
|
||||||
description = "Path to config file. (You need to create this file yourself!)";
|
description = "Path to config file.";
|
||||||
|
};
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
default = "sabnzbd";
|
||||||
|
description = "User to run the service as";
|
||||||
|
};
|
||||||
|
|
||||||
|
group = mkOption {
|
||||||
|
default = "sabnzbd";
|
||||||
|
description = "Group to run the service as";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -31,23 +41,29 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
users.extraUsers =
|
users.extraUsers.sabnzbd = {
|
||||||
[ { name = "sabnzbd";
|
|
||||||
uid = config.ids.uids.sabnzbd;
|
uid = config.ids.uids.sabnzbd;
|
||||||
|
group = "sabnzbd";
|
||||||
description = "sabnzbd user";
|
description = "sabnzbd user";
|
||||||
home = "/homeless-shelter";
|
home = "/var/lib/sabnzbd/";
|
||||||
}
|
createHome = true;
|
||||||
];
|
};
|
||||||
|
|
||||||
systemd.services.sabnzbd =
|
users.extraGroups.sabnzbd = {
|
||||||
{ description = "sabnzbd server";
|
gid = config.ids.gids.sabnzbd;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.sabnzbd = {
|
||||||
|
description = "sabnzbd server";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
|
GuessMainPID = "no";
|
||||||
|
User = "${cfg.user}";
|
||||||
|
Group = "${cfg.group}";
|
||||||
ExecStart = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}";
|
ExecStart = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -282,8 +282,8 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
users.extraUsers.sshd =
|
users.extraUsers.sshd =
|
||||||
{ description = "SSH privilege separation user";
|
{ isSystemUser = true;
|
||||||
home = "/var/empty";
|
description = "SSH privilege separation user";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc = authKeysFiles ++ [
|
environment.etc = authKeysFiles ++ [
|
||||||
|
@ -72,6 +72,30 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultShared = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Specifies whether local printers are shared by default.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
browsing = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Specifies whether shared printers are advertised.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
webInterface = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Specifies whether the web interface is enabled.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
cupsdConf = mkOption {
|
cupsdConf = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
@ -183,10 +207,10 @@ in
|
|||||||
# gets loaded, and then cups cannot access the printers.
|
# gets loaded, and then cups cannot access the printers.
|
||||||
boot.blacklistedKernelModules = [ "usblp" ];
|
boot.blacklistedKernelModules = [ "usblp" ];
|
||||||
|
|
||||||
systemd.services.cups =
|
systemd.packages = [ cups ];
|
||||||
{ description = "CUPS Printing Daemon";
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
systemd.services.cups =
|
||||||
|
{ wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "network.target" ];
|
wants = [ "network.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
@ -200,9 +224,6 @@ in
|
|||||||
mkdir -m 0755 -p ${cfg.tempDir}
|
mkdir -m 0755 -p ${cfg.tempDir}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig.Type = "forking";
|
|
||||||
serviceConfig.ExecStart = "@${cups}/sbin/cupsd cupsd";
|
|
||||||
|
|
||||||
restartTriggers =
|
restartTriggers =
|
||||||
[ config.environment.etc."cups/cups-files.conf".source
|
[ config.environment.etc."cups/cups-files.conf".source
|
||||||
config.environment.etc."cups/cupsd.conf".source
|
config.environment.etc."cups/cupsd.conf".source
|
||||||
@ -262,9 +283,11 @@ in
|
|||||||
|
|
||||||
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
|
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
|
||||||
|
|
||||||
Browsing On
|
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
|
||||||
BrowseOrder allow,deny
|
|
||||||
BrowseAllow @LOCAL
|
Browsing ${if cfg.browsing then "Yes" else "No"}
|
||||||
|
|
||||||
|
WebInterface ${if cfg.webInterface then "Yes" else "No"}
|
||||||
|
|
||||||
DefaultAuthType Basic
|
DefaultAuthType Basic
|
||||||
|
|
||||||
|
@ -42,7 +42,10 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
users.extraUsers.nscd.description = "Name service cache daemon user";
|
users.extraUsers.nscd =
|
||||||
|
{ isSystemUser = true;
|
||||||
|
description = "Name service cache daemon user";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.nscd =
|
systemd.services.nscd =
|
||||||
{ description = "Name Service Cache Daemon";
|
{ description = "Name Service Cache Daemon";
|
||||||
|
@ -21,7 +21,7 @@ let
|
|||||||
destination = "/share/applications/mimeapps.list";
|
destination = "/share/applications/mimeapps.list";
|
||||||
text = ''
|
text = ''
|
||||||
[Default Applications]
|
[Default Applications]
|
||||||
inode/directory=nautilus.desktop
|
inode/directory=nautilus.desktop;org.gnome.Nautilus.desktop
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ in {
|
|||||||
|
|
||||||
environment.gnome3.packageSet = mkOption {
|
environment.gnome3.packageSet = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
example = literalExample "pkgs.gnome3_12";
|
example = literalExample "pkgs.gnome3_16";
|
||||||
description = "Which GNOME 3 package set to use.";
|
description = "Which GNOME 3 package set to use.";
|
||||||
apply = p: if p == null then pkgs.gnome3 else p;
|
apply = p: if p == null then pkgs.gnome3 else p;
|
||||||
};
|
};
|
||||||
@ -80,6 +80,7 @@ in {
|
|||||||
services.telepathy.enable = mkDefault true;
|
services.telepathy.enable = mkDefault true;
|
||||||
networking.networkmanager.enable = mkDefault true;
|
networking.networkmanager.enable = mkDefault true;
|
||||||
services.upower.enable = config.powerManagement.enable;
|
services.upower.enable = config.powerManagement.enable;
|
||||||
|
hardware.bluetooth.enable = mkDefault true;
|
||||||
|
|
||||||
fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell_fonts ];
|
fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell_fonts ];
|
||||||
|
|
||||||
@ -108,9 +109,6 @@ in {
|
|||||||
# Override default mimeapps
|
# Override default mimeapps
|
||||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
|
||||||
|
|
||||||
# Let gnome-control-center find gnome-shell search providers
|
|
||||||
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
|
|
||||||
|
|
||||||
# Let nautilus find extensions
|
# Let nautilus find extensions
|
||||||
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
|
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
|
||||||
|
|
||||||
@ -120,6 +118,9 @@ in {
|
|||||||
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||||
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
|
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
|
||||||
|
|
||||||
|
# Find the mouse
|
||||||
|
export XCURSOR_PATH=~/.icons:${config.system.path}/share/icons
|
||||||
|
|
||||||
${gnome3.gnome_session}/bin/gnome-session&
|
${gnome3.gnome_session}/bin/gnome-session&
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
'';
|
'';
|
||||||
@ -128,52 +129,15 @@ in {
|
|||||||
environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules"
|
environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules"
|
||||||
"${gnome3.glib_networking}/lib/gio/modules"
|
"${gnome3.glib_networking}/lib/gio/modules"
|
||||||
"${gnome3.gvfs}/lib/gio/modules" ];
|
"${gnome3.gvfs}/lib/gio/modules" ];
|
||||||
environment.systemPackages =
|
environment.systemPackages = gnome3.corePackages ++ cfg.sessionPath
|
||||||
[ pkgs.desktop_file_utils
|
++ (removePackagesByName gnome3.optionalPackages config.environment.gnome3.excludePackages);
|
||||||
gnome3.glib_networking
|
|
||||||
gnome3.gtk3 # for gtk-update-icon-cache
|
|
||||||
pkgs.ibus
|
|
||||||
pkgs.shared_mime_info # for update-mime-database
|
|
||||||
gnome3.gvfs
|
|
||||||
gnome3.dconf
|
|
||||||
gnome3.gnome-backgrounds
|
|
||||||
gnome3.gnome_control_center
|
|
||||||
gnome3.gnome_icon_theme
|
|
||||||
gnome3.gnome-menus
|
|
||||||
gnome3.gnome_settings_daemon
|
|
||||||
gnome3.gnome_shell
|
|
||||||
gnome3.gnome_themes_standard
|
|
||||||
] ++ cfg.sessionPath ++ (removePackagesByName [
|
|
||||||
gnome3.baobab
|
|
||||||
gnome3.empathy
|
|
||||||
gnome3.eog
|
|
||||||
gnome3.epiphany
|
|
||||||
gnome3.evince
|
|
||||||
gnome3.gucharmap
|
|
||||||
gnome3.nautilus
|
|
||||||
gnome3.totem
|
|
||||||
gnome3.vino
|
|
||||||
gnome3.yelp
|
|
||||||
gnome3.gnome-calculator
|
|
||||||
gnome3.gnome-contacts
|
|
||||||
gnome3.gnome-font-viewer
|
|
||||||
gnome3.gnome-screenshot
|
|
||||||
gnome3.gnome-shell-extensions
|
|
||||||
gnome3.gnome-system-log
|
|
||||||
gnome3.gnome-system-monitor
|
|
||||||
gnome3.gnome_terminal
|
|
||||||
gnome3.gnome-user-docs
|
|
||||||
|
|
||||||
gnome3.bijiben
|
# Use the correct gnome3 packageSet
|
||||||
gnome3.evolution
|
networking.networkmanager.basePackages =
|
||||||
gnome3.file-roller
|
{ inherit (pkgs) networkmanager modemmanager wpa_supplicant;
|
||||||
gnome3.gedit
|
inherit (gnome3) networkmanager_openvpn networkmanager_vpnc
|
||||||
gnome3.gnome-clocks
|
networkmanager_openconnect networkmanager_pptp
|
||||||
gnome3.gnome-music
|
networkmanager_l2tp; };
|
||||||
gnome3.gnome-tweak-tool
|
|
||||||
gnome3.gnome-photos
|
|
||||||
gnome3.nautilus-sendto
|
|
||||||
] config.environment.gnome3.excludePackages);
|
|
||||||
|
|
||||||
# Needed for themes and backgrounds
|
# Needed for themes and backgrounds
|
||||||
environment.pathsToLink = [ "/share" ];
|
environment.pathsToLink = [ "/share" ];
|
||||||
|
@ -76,7 +76,7 @@ in
|
|||||||
services.xserver.desktopManager.session = singleton {
|
services.xserver.desktopManager.session = singleton {
|
||||||
name = "kde5";
|
name = "kde5";
|
||||||
bgSupport = true;
|
bgSupport = true;
|
||||||
start = ''exec ${plasma5.startkde}/bin/startkde;'';
|
start = ''exec ${plasma5.plasma-workspace}/bin/startkde;'';
|
||||||
};
|
};
|
||||||
|
|
||||||
security.setuidOwners = singleton {
|
security.setuidOwners = singleton {
|
||||||
|
@ -58,14 +58,14 @@ in
|
|||||||
# Find the mouse
|
# Find the mouse
|
||||||
XCURSOR_PATH = "~/.icons:${config.system.path}/share/icons";
|
XCURSOR_PATH = "~/.icons:${config.system.path}/share/icons";
|
||||||
};
|
};
|
||||||
execCmd = "exec ${gdm}/sbin/gdm";
|
execCmd = "exec ${gdm}/bin/gdm";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Because sd_login_monitor_new requires /run/systemd/machines
|
# Because sd_login_monitor_new requires /run/systemd/machines
|
||||||
systemd.services.display-manager.wants = [ "systemd-machined.service" ];
|
systemd.services.display-manager.wants = [ "systemd-machined.service" ];
|
||||||
systemd.services.display-manager.after = [ "systemd-machined.service" ];
|
systemd.services.display-manager.after = [ "systemd-machined.service" ];
|
||||||
|
|
||||||
systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou ];
|
systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou pkgs.xlibs.xhost pkgs.dbus_tools ];
|
||||||
|
|
||||||
services.dbus.packages = [ gdm ];
|
services.dbus.packages = [ gdm ];
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
theme = pkgs.gnome3.gnome_themes_standard;
|
theme = pkgs.gnome3.gnome_themes_standard;
|
||||||
icons = pkgs.gnome3.gnome_icon_theme;
|
icons = pkgs.gnome3.defaultIconTheme;
|
||||||
|
|
||||||
# The default greeter provided with this expression is the GTK greeter.
|
# The default greeter provided with this expression is the GTK greeter.
|
||||||
# Again, we need a few things in the environment for the greeter to run with
|
# Again, we need a few things in the environment for the greeter to run with
|
||||||
|
@ -60,22 +60,26 @@ addEntry() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local kernel=$(readlink -f $path/kernel)
|
local kernel=$(readlink -f $path/kernel)
|
||||||
# local initrd=$(readlink -f $path/initrd)
|
local initrd=$(readlink -f $path/initrd)
|
||||||
|
|
||||||
if test -n "@copyKernels@"; then
|
if test -n "@copyKernels@"; then
|
||||||
copyToKernelsDir $kernel; kernel=$result
|
copyToKernelsDir $kernel; kernel=$result
|
||||||
# copyToKernelsDir $initrd; initrd=$result
|
copyToKernelsDir $initrd; initrd=$result
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $(readlink -f $path) > $outdir/$generation-system
|
echo $(readlink -f $path) > $outdir/$generation-system
|
||||||
echo $(readlink -f $path/init) > $outdir/$generation-init
|
echo $(readlink -f $path/init) > $outdir/$generation-init
|
||||||
cp $path/kernel-params $outdir/$generation-cmdline.txt
|
cp $path/kernel-params $outdir/$generation-cmdline.txt
|
||||||
# echo $initrd > $outdir/$generation-initrd
|
echo $initrd > $outdir/$generation-initrd
|
||||||
echo $kernel > $outdir/$generation-kernel
|
echo $kernel > $outdir/$generation-kernel
|
||||||
|
|
||||||
if test $(readlink -f "$path") = "$default"; then
|
if test $(readlink -f "$path") = "$default"; then
|
||||||
copyForced $kernel /boot/kernel.img
|
if [ @version@ -eq 1 ]; then
|
||||||
# copyForced $initrd /boot/initrd
|
copyForced $kernel /boot/kernel.img
|
||||||
|
else
|
||||||
|
copyForced $kernel /boot/kernel7.img
|
||||||
|
fi
|
||||||
|
copyForced $initrd /boot/initrd
|
||||||
cp "$(readlink -f "$path/init")" /boot/nixos-init
|
cp "$(readlink -f "$path/init")" /boot/nixos-init
|
||||||
echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
|
echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
|
||||||
|
|
||||||
@ -98,8 +102,11 @@ fwdir=@firmware@/share/raspberrypi/boot/
|
|||||||
copyForced $fwdir/bootcode.bin /boot/bootcode.bin
|
copyForced $fwdir/bootcode.bin /boot/bootcode.bin
|
||||||
copyForced $fwdir/fixup.dat /boot/fixup.dat
|
copyForced $fwdir/fixup.dat /boot/fixup.dat
|
||||||
copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
|
copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
|
||||||
|
copyForced $fwdir/fixup_db.dat /boot/fixup_db.dat
|
||||||
copyForced $fwdir/start.elf /boot/start.elf
|
copyForced $fwdir/start.elf /boot/start.elf
|
||||||
copyForced $fwdir/start_cd.elf /boot/start_cd.elf
|
copyForced $fwdir/start_cd.elf /boot/start_cd.elf
|
||||||
|
copyForced $fwdir/start_db.elf /boot/start_db.elf
|
||||||
|
copyForced $fwdir/start_x.elf /boot/start_x.elf
|
||||||
|
|
||||||
# Remove obsolete files from /boot/old.
|
# Remove obsolete files from /boot/old.
|
||||||
for fn in /boot/old/*linux* /boot/old/*initrd*; do
|
for fn in /boot/old/*linux* /boot/old/*initrd*; do
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
cfg = config.boot.loader.raspberryPi;
|
||||||
|
|
||||||
builder = pkgs.substituteAll {
|
builder = pkgs.substituteAll {
|
||||||
src = ./builder.sh;
|
src = ./builder.sh;
|
||||||
@ -10,6 +11,7 @@ let
|
|||||||
inherit (pkgs) bash;
|
inherit (pkgs) bash;
|
||||||
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
||||||
firmware = pkgs.raspberrypifw;
|
firmware = pkgs.raspberrypifw;
|
||||||
|
version = cfg.version;
|
||||||
};
|
};
|
||||||
|
|
||||||
platform = pkgs.stdenv.platform;
|
platform = pkgs.stdenv.platform;
|
||||||
@ -29,11 +31,23 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.loader.raspberryPi.version = mkOption {
|
||||||
|
default = 2;
|
||||||
|
type = types.int;
|
||||||
|
description = ''
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.boot.loader.raspberryPi.enable {
|
config = mkIf config.boot.loader.raspberryPi.enable {
|
||||||
system.build.installBootLoader = builder;
|
system.build.installBootLoader = builder;
|
||||||
system.boot.loader.id = "raspberrypi";
|
system.boot.loader.id = "raspberrypi";
|
||||||
system.boot.loader.kernelFile = platform.kernelTarget;
|
system.boot.loader.kernelFile = platform.kernelTarget;
|
||||||
|
assertions = [
|
||||||
|
{ assertion = (cfg.version == 1 || cfg.version == 2);
|
||||||
|
message = "loader.raspberryPi.version should be 1 or 2";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -286,8 +286,8 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to allow TRIM requests to the underlying device. This option
|
Whether to allow TRIM requests to the underlying device. This option
|
||||||
has security implications, please read the LUKS documentation before
|
has security implications; please read the LUKS documentation before
|
||||||
activating in.
|
activating it.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -303,43 +303,43 @@ in
|
|||||||
twoFactor = mkOption {
|
twoFactor = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Whether to use a passphrase and a Yubikey (true), or only a Yubikey (false)";
|
description = "Whether to use a passphrase and a Yubikey (true), or only a Yubikey (false).";
|
||||||
};
|
};
|
||||||
|
|
||||||
slot = mkOption {
|
slot = mkOption {
|
||||||
default = 2;
|
default = 2;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Which slot on the Yubikey to challenge";
|
description = "Which slot on the Yubikey to challenge.";
|
||||||
};
|
};
|
||||||
|
|
||||||
saltLength = mkOption {
|
saltLength = mkOption {
|
||||||
default = 16;
|
default = 16;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Length of the new salt in byte (64 is the effective maximum)";
|
description = "Length of the new salt in byte (64 is the effective maximum).";
|
||||||
};
|
};
|
||||||
|
|
||||||
keyLength = mkOption {
|
keyLength = mkOption {
|
||||||
default = 64;
|
default = 64;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Length of the LUKS slot key derived with PBKDF2 in byte";
|
description = "Length of the LUKS slot key derived with PBKDF2 in byte.";
|
||||||
};
|
};
|
||||||
|
|
||||||
iterationStep = mkOption {
|
iterationStep = mkOption {
|
||||||
default = 0;
|
default = 0;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "How much the iteration count for PBKDF2 is increased at each successful authentication";
|
description = "How much the iteration count for PBKDF2 is increased at each successful authentication.";
|
||||||
};
|
};
|
||||||
|
|
||||||
gracePeriod = mkOption {
|
gracePeriod = mkOption {
|
||||||
default = 2;
|
default = 2;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Time in seconds to wait before attempting to find the Yubikey";
|
description = "Time in seconds to wait before attempting to find the Yubikey.";
|
||||||
};
|
};
|
||||||
|
|
||||||
ramfsMountPoint = mkOption {
|
ramfsMountPoint = mkOption {
|
||||||
default = "/crypt-ramfs";
|
default = "/crypt-ramfs";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "Path where the ramfs used to update the LUKS key will be mounted in stage-1";
|
description = "Path where the ramfs used to update the LUKS key will be mounted during early boot.";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* TODO: Add to the documentation of the current module:
|
/* TODO: Add to the documentation of the current module:
|
||||||
@ -359,13 +359,13 @@ in
|
|||||||
fsType = mkOption {
|
fsType = mkOption {
|
||||||
default = "vfat";
|
default = "vfat";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "The filesystem of the unencrypted device";
|
description = "The filesystem of the unencrypted device.";
|
||||||
};
|
};
|
||||||
|
|
||||||
mountPoint = mkOption {
|
mountPoint = mkOption {
|
||||||
default = "/crypt-storage";
|
default = "/crypt-storage";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "Path where the unencrypted device will be mounted in stage-1";
|
description = "Path where the unencrypted device will be mounted during early boot.";
|
||||||
};
|
};
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
@ -419,10 +419,10 @@ in
|
|||||||
mkdir -p $out/etc/ssl
|
mkdir -p $out/etc/ssl
|
||||||
cp -pdv ${pkgs.openssl}/etc/ssl/openssl.cnf $out/etc/ssl
|
cp -pdv ${pkgs.openssl}/etc/ssl/openssl.cnf $out/etc/ssl
|
||||||
|
|
||||||
cat > $out/bin/openssl-wrap <<EOF
|
cat > $out/bin/openssl-wrap <<EOF
|
||||||
#!$out/bin/sh
|
#!$out/bin/sh
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/openssl-wrap
|
chmod +x $out/bin/openssl-wrap
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -432,10 +432,10 @@ EOF
|
|||||||
$out/bin/ykchalresp -V
|
$out/bin/ykchalresp -V
|
||||||
$out/bin/ykinfo -V
|
$out/bin/ykinfo -V
|
||||||
cat > $out/bin/openssl-wrap <<EOF
|
cat > $out/bin/openssl-wrap <<EOF
|
||||||
#!$out/bin/sh
|
#!$out/bin/sh
|
||||||
export OPENSSL_CONF=$out/etc/ssl/openssl.cnf
|
export OPENSSL_CONF=$out/etc/ssl/openssl.cnf
|
||||||
$out/bin/openssl "\$@"
|
$out/bin/openssl "\$@"
|
||||||
EOF
|
EOF
|
||||||
$out/bin/openssl-wrap version
|
$out/bin/openssl-wrap version
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
@ -132,7 +132,7 @@ let
|
|||||||
commonNetworkOptions = {
|
commonNetworkOptions = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to manage network configuration using <command>systemd-network</command>.
|
Whether to manage network configuration using <command>systemd-network</command>.
|
||||||
@ -482,6 +482,11 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
commonMatchText = def: ''
|
||||||
|
[Match]
|
||||||
|
${attrsToSection def.matchConfig}
|
||||||
|
'';
|
||||||
|
|
||||||
linkToUnit = name: def:
|
linkToUnit = name: def:
|
||||||
{ inherit (def) enable;
|
{ inherit (def) enable;
|
||||||
text = commonMatchText def +
|
text = commonMatchText def +
|
||||||
|
@ -25,6 +25,69 @@ rec {
|
|||||||
ln -s /dev/null $out/${shellEscape name}
|
ln -s /dev/null $out/${shellEscape name}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
boolValues = [true false "yes" "no"];
|
||||||
|
|
||||||
|
digits = map toString (range 0 9);
|
||||||
|
|
||||||
|
isByteFormat = s:
|
||||||
|
let
|
||||||
|
l = reverseList (stringToCharacters s);
|
||||||
|
suffix = head l;
|
||||||
|
nums = tail l;
|
||||||
|
in elem suffix (["K" "M" "G" "T"] ++ digits)
|
||||||
|
&& all (num: elem num digits) nums;
|
||||||
|
|
||||||
|
assertByteFormat = name: group: attr:
|
||||||
|
optional (attr ? ${name} && ! isByteFormat attr.${name})
|
||||||
|
"Systemd ${group} field `${name}' must be in byte format [0-9]+[KMGT].";
|
||||||
|
|
||||||
|
hexChars = stringToCharacters "0123456789abcdefABCDEF";
|
||||||
|
|
||||||
|
isMacAddress = s: stringLength s == 17
|
||||||
|
&& flip all (splitString ":" s) (bytes:
|
||||||
|
all (byte: elem byte hexChars) (stringToCharacters bytes)
|
||||||
|
);
|
||||||
|
|
||||||
|
assertMacAddress = name: group: attr:
|
||||||
|
optional (attr ? ${name} && ! isMacAddress attr.${name})
|
||||||
|
"Systemd ${group} field `${name}' must be a valid mac address.";
|
||||||
|
|
||||||
|
|
||||||
|
assertValueOneOf = name: values: group: attr:
|
||||||
|
optional (attr ? ${name} && !elem attr.${name} values)
|
||||||
|
"Systemd ${group} field `${name}' cannot have value `${attr.${name}}'.";
|
||||||
|
|
||||||
|
assertHasField = name: group: attr:
|
||||||
|
optional (!(attr ? ${name}))
|
||||||
|
"Systemd ${group} field `${name}' must exist.";
|
||||||
|
|
||||||
|
assertRange = name: min: max: group: attr:
|
||||||
|
optional (attr ? ${name} && !(min <= attr.${name} && max >= attr.${name}))
|
||||||
|
"Systemd ${group} field `${name}' is outside the range [${toString min},${toString max}]";
|
||||||
|
|
||||||
|
assertOnlyFields = fields: group: attr:
|
||||||
|
let badFields = filter (name: ! elem name fields) (attrNames attr); in
|
||||||
|
optional (badFields != [ ])
|
||||||
|
"Systemd ${group} has extra fields [${concatStringsSep " " badFields}].";
|
||||||
|
|
||||||
|
checkUnitConfig = group: checks: v:
|
||||||
|
let errors = concatMap (c: c group v) checks; in
|
||||||
|
if errors == [] then true
|
||||||
|
else builtins.trace (concatStringsSep "\n" errors) false;
|
||||||
|
|
||||||
|
toOption = x:
|
||||||
|
if x == true then "true"
|
||||||
|
else if x == false then "false"
|
||||||
|
else toString x;
|
||||||
|
|
||||||
|
attrsToSection = as:
|
||||||
|
concatStrings (concatLists (mapAttrsToList (name: value:
|
||||||
|
map (x: ''
|
||||||
|
${name}=${toOption x}
|
||||||
|
'')
|
||||||
|
(if isList value then value else [value]))
|
||||||
|
as));
|
||||||
|
|
||||||
generateUnits = type: units: upstreamUnits: upstreamWants:
|
generateUnits = type: units: upstreamUnits: upstreamWants:
|
||||||
pkgs.runCommand "${type}-units" { preferLocalBuild = true; } ''
|
pkgs.runCommand "${type}-units" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
@ -1,58 +1,9 @@
|
|||||||
{ config, lib }:
|
{ config, lib }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
with import ./systemd-lib.nix { inherit config lib pkgs; };
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
boolValues = [true false "yes" "no"];
|
|
||||||
|
|
||||||
assertValueOneOf = name: values: group: attr:
|
|
||||||
optional (attr ? ${name} && !elem attr.${name} values)
|
|
||||||
"Systemd ${group} field `${name}' cannot have value `${attr.${name}}'.";
|
|
||||||
|
|
||||||
assertHasField = name: group: attr:
|
|
||||||
optional (!(attr ? ${name}))
|
|
||||||
"Systemd ${group} field `${name}' must exist.";
|
|
||||||
|
|
||||||
assertOnlyFields = fields: group: attr:
|
|
||||||
let badFields = filter (name: ! elem name fields) (attrNames attr); in
|
|
||||||
optional (badFields != [ ])
|
|
||||||
"Systemd ${group} has extra fields [${concatStringsSep " " badFields}].";
|
|
||||||
|
|
||||||
assertRange = name: min: max: group: attr:
|
|
||||||
optional (attr ? ${name} && !(min <= attr.${name} && max >= attr.${name}))
|
|
||||||
"Systemd ${group} field `${name}' is outside the range [${toString min},${toString max}]";
|
|
||||||
|
|
||||||
digits = map toString (range 0 9);
|
|
||||||
|
|
||||||
isByteFormat = s:
|
|
||||||
let
|
|
||||||
l = reverseList (stringToCharacters s);
|
|
||||||
suffix = head l;
|
|
||||||
nums = tail l;
|
|
||||||
in elem suffix (["K" "M" "G" "T"] ++ digits)
|
|
||||||
&& all (num: elem num digits) nums;
|
|
||||||
|
|
||||||
assertByteFormat = name: group: attr:
|
|
||||||
optional (attr ? ${name} && ! isByteFormat attr.${name})
|
|
||||||
"Systemd ${group} field `${name}' must be in byte format [0-9]+[KMGT].";
|
|
||||||
|
|
||||||
hexChars = stringToCharacters "0123456789abcdefABCDEF";
|
|
||||||
|
|
||||||
isMacAddress = s: stringLength s == 17
|
|
||||||
&& flip all (splitString ":" s) (bytes:
|
|
||||||
all (byte: elem byte hexChars) (stringToCharacters bytes)
|
|
||||||
);
|
|
||||||
|
|
||||||
assertMacAddress = name: group: attr:
|
|
||||||
optional (attr ? ${name} && ! isMacAddress attr.${name})
|
|
||||||
"Systemd ${group} field `${name}' must be a valid mac address.";
|
|
||||||
|
|
||||||
checkUnitConfig = group: checks: v:
|
|
||||||
let errors = concatMap (c: c group v) checks; in
|
|
||||||
if errors == [] then true
|
|
||||||
else builtins.trace (concatStringsSep "\n" errors) false;
|
|
||||||
|
|
||||||
checkService = checkUnitConfig "Service" [
|
checkService = checkUnitConfig "Service" [
|
||||||
(assertValueOneOf "Type" [
|
(assertValueOneOf "Type" [
|
||||||
"simple" "forking" "oneshot" "dbus" "notify" "idle"
|
"simple" "forking" "oneshot" "dbus" "notify" "idle"
|
||||||
|
@ -276,19 +276,6 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
toOption = x:
|
|
||||||
if x == true then "true"
|
|
||||||
else if x == false then "false"
|
|
||||||
else toString x;
|
|
||||||
|
|
||||||
attrsToSection = as:
|
|
||||||
concatStrings (concatLists (mapAttrsToList (name: value:
|
|
||||||
map (x: ''
|
|
||||||
${name}=${toOption x}
|
|
||||||
'')
|
|
||||||
(if isList value then value else [value]))
|
|
||||||
as));
|
|
||||||
|
|
||||||
commonUnitText = def: ''
|
commonUnitText = def: ''
|
||||||
[Unit]
|
[Unit]
|
||||||
${attrsToSection def.unitConfig}
|
${attrsToSection def.unitConfig}
|
||||||
@ -369,11 +356,6 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
commonMatchText = def: ''
|
|
||||||
[Match]
|
|
||||||
${attrsToSection def.matchConfig}
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -754,10 +736,18 @@ in
|
|||||||
${concatStringsSep "\n" cfg.tmpfiles.rules}
|
${concatStringsSep "\n" cfg.tmpfiles.rules}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Some overrides to upstream units.
|
||||||
|
systemd.services."systemd-backlight@".restartIfChanged = false;
|
||||||
|
systemd.services."systemd-rfkill@".restartIfChanged = false;
|
||||||
systemd.services."user@".restartIfChanged = false;
|
systemd.services."user@".restartIfChanged = false;
|
||||||
|
|
||||||
systemd.services.systemd-remount-fs.restartIfChanged = false;
|
|
||||||
systemd.services.systemd-journal-flush.restartIfChanged = false;
|
systemd.services.systemd-journal-flush.restartIfChanged = false;
|
||||||
|
systemd.services.systemd-journald.restartIfChanged = false; # FIXME: shouldn't be necessary with systemd 219
|
||||||
|
systemd.services.systemd-random-seed.restartIfChanged = false;
|
||||||
|
systemd.services.systemd-remount-fs.restartIfChanged = false;
|
||||||
|
systemd.services.systemd-update-utmp.restartIfChanged = false;
|
||||||
|
systemd.services.systemd-user-sessions.restartIfChanged = false; # Restart kills all active sessions.
|
||||||
|
systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true;
|
||||||
|
systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
61
nixos/modules/virtualisation/azure-common.nix
Normal file
61
nixos/modules/virtualisation/azure-common.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
imports = [ ../profiles/headless.nix ];
|
||||||
|
|
||||||
|
boot.kernelParams = [ "console=ttyS0" "earlyprintk=ttyS0" "rootdelay=300" "panic=1" "boot.panic_on_fail" ];
|
||||||
|
boot.initrd.kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storvsc" ];
|
||||||
|
|
||||||
|
# Generate a GRUB menu.
|
||||||
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
|
boot.loader.grub.timeout = 0;
|
||||||
|
|
||||||
|
# Don't put old configurations in the GRUB menu. The user has no
|
||||||
|
# way to select them anyway.
|
||||||
|
boot.loader.grub.configurationLimit = 0;
|
||||||
|
|
||||||
|
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
||||||
|
|
||||||
|
# Allow root logins only using the SSH key that the user specified
|
||||||
|
# at instance creation time, ping client connections to avoid timeouts
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.openssh.permitRootLogin = "without-password";
|
||||||
|
services.openssh.extraConfig = ''
|
||||||
|
ClientAliveInterval 180
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Force getting the hostname from Azure
|
||||||
|
networking.hostName = mkDefault "";
|
||||||
|
|
||||||
|
# Always include cryptsetup so that NixOps can use it.
|
||||||
|
# sg_scan is needed to finalize disk removal on older kernels
|
||||||
|
environment.systemPackages = [ pkgs.cryptsetup pkgs.sg3_utils ];
|
||||||
|
|
||||||
|
networking.usePredictableInterfaceNames = false;
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:0", ATTR{removable}=="0", SYMLINK+="disk/by-lun/0",
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:1", ATTR{removable}=="0", SYMLINK+="disk/by-lun/1",
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:2", ATTR{removable}=="0", SYMLINK+="disk/by-lun/2"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:3", ATTR{removable}=="0", SYMLINK+="disk/by-lun/3"
|
||||||
|
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:4", ATTR{removable}=="0", SYMLINK+="disk/by-lun/4"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:5", ATTR{removable}=="0", SYMLINK+="disk/by-lun/5"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:6", ATTR{removable}=="0", SYMLINK+="disk/by-lun/6"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:7", ATTR{removable}=="0", SYMLINK+="disk/by-lun/7"
|
||||||
|
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:8", ATTR{removable}=="0", SYMLINK+="disk/by-lun/8"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:9", ATTR{removable}=="0", SYMLINK+="disk/by-lun/9"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:10", ATTR{removable}=="0", SYMLINK+="disk/by-lun/10"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:11", ATTR{removable}=="0", SYMLINK+="disk/by-lun/11"
|
||||||
|
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:12", ATTR{removable}=="0", SYMLINK+="disk/by-lun/12"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:13", ATTR{removable}=="0", SYMLINK+="disk/by-lun/13"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:14", ATTR{removable}=="0", SYMLINK+="disk/by-lun/14"
|
||||||
|
ENV{DEVTYPE}=="disk", KERNEL!="sda" SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNELS=="?:0:0:15", ATTR{removable}=="0", SYMLINK+="disk/by-lun/15"
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
@ -5,8 +5,6 @@ let
|
|||||||
diskSize = "4096";
|
diskSize = "4096";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../profiles/headless.nix ];
|
|
||||||
|
|
||||||
system.build.azureImage =
|
system.build.azureImage =
|
||||||
pkgs.vmTools.runInLinuxVM (
|
pkgs.vmTools.runInLinuxVM (
|
||||||
pkgs.runCommand "azure-image"
|
pkgs.runCommand "azure-image"
|
||||||
@ -24,7 +22,6 @@ in
|
|||||||
|
|
||||||
postVM =
|
postVM =
|
||||||
''
|
''
|
||||||
echo Converting
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd
|
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd
|
||||||
rm $diskImage
|
rm $diskImage
|
||||||
@ -93,34 +90,11 @@ in
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
imports = [ ./azure-common.nix ];
|
||||||
|
|
||||||
# Azure metadata is available as a CD-ROM drive.
|
# Azure metadata is available as a CD-ROM drive.
|
||||||
fileSystems."/metadata".device = "/dev/sr0";
|
fileSystems."/metadata".device = "/dev/sr0";
|
||||||
|
|
||||||
boot.kernelParams = [ "console=ttyS0" "earlyprintk=ttyS0" "rootdelay=300" "panic=1" "boot.panic_on_fail" ];
|
|
||||||
boot.initrd.kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storvsc" ];
|
|
||||||
|
|
||||||
# Generate a GRUB menu.
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
|
||||||
boot.loader.grub.version = 2;
|
|
||||||
boot.loader.grub.timeout = 0;
|
|
||||||
|
|
||||||
# Don't put old configurations in the GRUB menu. The user has no
|
|
||||||
# way to select them anyway.
|
|
||||||
boot.loader.grub.configurationLimit = 0;
|
|
||||||
|
|
||||||
# Allow root logins only using the SSH key that the user specified
|
|
||||||
# at instance creation time.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.permitRootLogin = "without-password";
|
|
||||||
|
|
||||||
# Force getting the hostname from Azure
|
|
||||||
networking.hostName = mkDefault "";
|
|
||||||
|
|
||||||
# Always include cryptsetup so that NixOps can use it.
|
|
||||||
environment.systemPackages = [ pkgs.cryptsetup ];
|
|
||||||
|
|
||||||
systemd.services.fetch-ssh-keys =
|
systemd.services.fetch-ssh-keys =
|
||||||
{ description = "Fetch host keys and authorized_keys for root user";
|
{ description = "Fetch host keys and authorized_keys for root user";
|
||||||
|
|
||||||
@ -157,8 +131,4 @@ in
|
|||||||
serviceConfig.StandardOutput = "journal+console";
|
serviceConfig.StandardOutput = "journal+console";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.usePredictableInterfaceNames = false;
|
|
||||||
|
|
||||||
#users.extraUsers.root.openssh.authorizedKeys.keys = [ (builtins.readFile <ssh-pub-key>) ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ with lib;
|
|||||||
|
|
||||||
wget="wget -q --retry-connrefused -O -"
|
wget="wget -q --retry-connrefused -O -"
|
||||||
|
|
||||||
echo "setting host name..."
|
|
||||||
${optionalString (config.networking.hostName == "") ''
|
${optionalString (config.networking.hostName == "") ''
|
||||||
|
echo "setting host name..."
|
||||||
${pkgs.nettools}/bin/hostname $($wget http://169.254.169.254/1.0/meta-data/hostname)
|
${pkgs.nettools}/bin/hostname $($wget http://169.254.169.254/1.0/meta-data/hostname)
|
||||||
''}
|
''}
|
||||||
|
|
||||||
@ -69,9 +69,11 @@ with lib;
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
${optionalString (! config.ec2.metadata) ''
|
${optionalString (! config.ec2.metadata) ''
|
||||||
# Since the user data is sensitive, prevent it from being
|
# Since the user data is sensitive, prevent it from
|
||||||
# accessed from now on.
|
# being accessed from now on. FIXME: remove at some
|
||||||
ip route add blackhole 169.254.169.254/32
|
# point, since current NixOps no longer relies on
|
||||||
|
# metadata secrecy.
|
||||||
|
ip route add blackhole 169.254.169.254/32
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ config, pkgs, modulesPath, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ "${modulesPath}/virtualisation/google-compute-image.nix" ];
|
imports = [ <nixpkgs/nixos/modules/virtualisation/google-compute-image.nix> ];
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,17 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualisation.libvirtd.extraOptions =
|
||||||
|
mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
example = [ "--verbose" ];
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Extra command line arguments passed to libvirtd on startup.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.onShutdown =
|
virtualisation.libvirtd.onShutdown =
|
||||||
mkOption {
|
mkOption {
|
||||||
type = types.enum ["shutdown" "suspend" ];
|
type = types.enum ["shutdown" "suspend" ];
|
||||||
@ -140,7 +151,7 @@ in
|
|||||||
done
|
done
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon --verbose'';
|
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon ${concatStringsSep " " cfg.extraOptions}'';
|
||||||
serviceConfig.Type = "forking";
|
serviceConfig.Type = "forking";
|
||||||
serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone
|
serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone
|
||||||
|
|
||||||
|
47
nixos/modules/virtualisation/vmware-guest.nix
Normal file
47
nixos/modules/virtualisation/vmware-guest.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.vmwareGuest;
|
||||||
|
open-vm-tools = pkgs.open-vm-tools;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.vmwareGuest.enable = mkEnableOption "Enable VMWare Guest Support";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [ {
|
||||||
|
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
|
||||||
|
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}";
|
||||||
|
} ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ open-vm-tools ];
|
||||||
|
|
||||||
|
systemd.services.vmware =
|
||||||
|
{ description = "VMWare Guest Service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig.ExecStart = "${open-vm-tools}/bin/vmtoolsd";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
videoDrivers = mkOverride 50 [ "vmware" ];
|
||||||
|
|
||||||
|
config = ''
|
||||||
|
Section "InputDevice"
|
||||||
|
Identifier "VMMouse"
|
||||||
|
Driver "vmmouse"
|
||||||
|
EndSection
|
||||||
|
'';
|
||||||
|
|
||||||
|
serverLayoutSection = ''
|
||||||
|
InputDevice "VMMouse"
|
||||||
|
'';
|
||||||
|
|
||||||
|
displayManager.sessionCommands = ''
|
||||||
|
${open-vm-tools}/bin/vmware-user-suid-wrapper
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,10 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{ users.extraUsers = pkgs.lib.singleton
|
{ users.extraUsers = lib.singleton
|
||||||
{ isNormalUser = true;
|
{ isNormalUser = true;
|
||||||
name = "alice";
|
name = "alice";
|
||||||
description = "Alice Foobar";
|
description = "Alice Foobar";
|
||||||
password = "foobar";
|
password = "foobar";
|
||||||
uid = 1000;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{ services.printing.enable = true;
|
{ services.printing.enable = true;
|
||||||
services.printing.listenAddresses = [ "*:631" ];
|
services.printing.listenAddresses = [ "*:631" ];
|
||||||
|
services.printing.defaultShared = true;
|
||||||
services.printing.extraConf =
|
services.printing.extraConf =
|
||||||
''
|
''
|
||||||
<Location />
|
<Location />
|
||||||
@ -33,6 +34,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
# Make sure that cups is up on both sides.
|
# Make sure that cups is up on both sides.
|
||||||
$server->waitForUnit("cups.service");
|
$server->waitForUnit("cups.service");
|
||||||
$client->waitForUnit("cups.service");
|
$client->waitForUnit("cups.service");
|
||||||
|
$client->sleep(10); # wait until cups is fully initialized
|
||||||
$client->succeed("lpstat -r") =~ /scheduler is running/ or die;
|
$client->succeed("lpstat -r") =~ /scheduler is running/ or die;
|
||||||
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
|
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
|
||||||
$client->succeed("curl --fail http://localhost:631/");
|
$client->succeed("curl --fail http://localhost:631/");
|
||||||
@ -48,7 +50,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
|
|
||||||
# Do some status checks.
|
# Do some status checks.
|
||||||
$client->succeed("lpstat -a") =~ /DeskjetRemote accepting requests/ or die;
|
$client->succeed("lpstat -a") =~ /DeskjetRemote accepting requests/ or die;
|
||||||
$client->succeed("lpstat -h server -a") =~ /DeskjetLocal accepting requests/ or die;
|
$client->succeed("lpstat -h server:631 -a") =~ /DeskjetLocal accepting requests/ or die;
|
||||||
$client->succeed("cupsdisable DeskjetRemote");
|
$client->succeed("cupsdisable DeskjetRemote");
|
||||||
$client->succeed("lpq") =~ /DeskjetRemote is not ready.*no entries/s or die;
|
$client->succeed("lpq") =~ /DeskjetRemote is not ready.*no entries/s or die;
|
||||||
$client->succeed("cupsenable DeskjetRemote");
|
$client->succeed("cupsenable DeskjetRemote");
|
||||||
@ -66,6 +68,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
|
|
||||||
# Print the file on the client.
|
# Print the file on the client.
|
||||||
$client->succeed("lp $file");
|
$client->succeed("lp $file");
|
||||||
|
$client->sleep(10);
|
||||||
$client->succeed("lpq") =~ /active.*root.*$fn/ or die;
|
$client->succeed("lpq") =~ /active.*root.*$fn/ or die;
|
||||||
|
|
||||||
# Ensure that a raw PCL file appeared in the server's queue
|
# Ensure that a raw PCL file appeared in the server's queue
|
||||||
@ -73,11 +76,13 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
# 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/d00001-001");
|
||||||
|
$server->sleep(10);
|
||||||
$server->succeed("lpq -a") =~ /$fn/ or die;
|
$server->succeed("lpq -a") =~ /$fn/ or die;
|
||||||
|
|
||||||
# Delete the job on the client. It should disappear on the
|
# Delete the job on the client. It should disappear on the
|
||||||
# server as well.
|
# server as well.
|
||||||
$client->succeed("lprm");
|
$client->succeed("lprm");
|
||||||
|
$client->sleep(10);
|
||||||
$client->succeed("lpq -a") =~ /no entries/;
|
$client->succeed("lpq -a") =~ /no entries/;
|
||||||
Machine::retry sub {
|
Machine::retry sub {
|
||||||
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
||||||
|
@ -6,13 +6,14 @@ with stdenv.lib;
|
|||||||
stdenv.mkDerivation rec{
|
stdenv.mkDerivation rec{
|
||||||
|
|
||||||
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||||
version = "0.10.0";
|
core_version = "0.10.1";
|
||||||
|
version = core_version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = [ "https://bitcoin.org/bin/bitcoin-core-0.10.0/bitcoin-${version}.tar.gz"
|
url = [ "https://bitcoin.org/bin/bitcoin-core-${core_version}/bitcoin-${version}.tar.gz"
|
||||||
"mirror://sourceforge/bitcoin/Bitcoin/bitcoin-0.10.0/bitcoin-${version}.tar.gz"
|
"mirror://sourceforge/bitcoin/Bitcoin/bitcoin-${core_version}/bitcoin-${version}.tar.gz"
|
||||||
];
|
];
|
||||||
sha256 = "a516cf6d9f58a117607148405334b35d3178df1ba1c59229609d2bcd08d30624";
|
sha256 = "287873f9ba4fd49cd4e4be7eba070d2606878f1690c5be0273164d37cbf3c138";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig autoreconfHook openssl db48 boost zlib
|
buildInputs = [ pkgconfig autoreconfHook openssl db48 boost zlib
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ fetchurl, stdenv, pkgconfig
|
{ fetchzip, stdenv, pkgconfig
|
||||||
, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf
|
, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf
|
||||||
, utillinux
|
, utillinux
|
||||||
, withGui }:
|
, withGui }:
|
||||||
@ -9,9 +9,9 @@ stdenv.mkDerivation rec {
|
|||||||
name = "darkcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
name = "darkcoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||||
version = "0.10.99.99";
|
version = "0.10.99.99";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "https://github.com/darkcoin/darkcoin/archive/v${version}.tar.gz";
|
url = "https://github.com/darkcoin/darkcoin/archive/v${version}.tar.gz";
|
||||||
sha256 = "1a05a7l878klg4wqk9ykndkhyknrd7jp75v38k99qgk5fi8wa752";
|
sha256 = "0sigvimqwc1mvaq43a8c2aq7fjla2ncafrals08qfq3jd6in8b4f";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig glib openssl db48 boost zlib miniupnpc ]
|
buildInputs = [ pkgconfig glib openssl db48 boost zlib miniupnpc ]
|
||||||
|
94
pkgs/applications/audio/ardour/ardour3.nix
Normal file
94
pkgs/applications/audio/ardour/ardour3.nix
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
|
||||||
|
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jack2
|
||||||
|
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
||||||
|
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
||||||
|
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
|
||||||
|
, perl, pkgconfig, python, serd, sord, sratom, suil }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
# Ardour git repo uses a mix of annotated and lightweight tags. Annotated
|
||||||
|
# tags are used for MAJOR.MINOR versioning, and lightweight tags are used
|
||||||
|
# in-between; MAJOR.MINOR.REV where REV is the number of commits since the
|
||||||
|
# last annotated tag. A slightly different version string format is needed
|
||||||
|
# for the 'revision' info that is built into the binary; it is the format of
|
||||||
|
# "git describe" when _not_ on an annotated tag(!): MAJOR.MINOR-REV-HASH.
|
||||||
|
|
||||||
|
# Version to build.
|
||||||
|
tag = "3.5.403";
|
||||||
|
|
||||||
|
# Version info that is built into the binary. Keep in sync with 'tag'. The
|
||||||
|
# last 8 digits is a (fake) commit id.
|
||||||
|
revision = "3.5-403-00000000";
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "ardour-${tag}";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = git://git.ardour.org/ardour/ardour.git;
|
||||||
|
rev = "refs/tags/${tag}";
|
||||||
|
sha256 = "0k1z8sbjf88dqn12kf9cykrqj38vkr879n2g6b4adk6cghn8wz3x";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
|
||||||
|
glibmm gtk gtkmm jack2 libgnomecanvas libgnomecanvasmm liblo
|
||||||
|
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
||||||
|
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
|
||||||
|
makeWrapper pango perl pkgconfig python serd sord sratom suil
|
||||||
|
];
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${revision}\"; }\n' > libs/ardour/revision.cc
|
||||||
|
sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
|
||||||
|
sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
|
||||||
|
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
|
||||||
|
'';
|
||||||
|
|
||||||
|
configurePhase = "python waf configure --optimize --prefix=$out";
|
||||||
|
|
||||||
|
buildPhase = "python waf";
|
||||||
|
|
||||||
|
# For the custom ardour clearlooks gtk-engine to work, it must be
|
||||||
|
# moved to a directory called "engines" and added to GTK_PATH
|
||||||
|
installPhase = ''
|
||||||
|
python waf install
|
||||||
|
mkdir -pv $out/gtk2/engines
|
||||||
|
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
|
||||||
|
wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
|
||||||
|
|
||||||
|
# Install desktop file
|
||||||
|
mkdir -p "$out/share/applications"
|
||||||
|
cat > "$out/share/applications/ardour.desktop" << EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Ardour 3
|
||||||
|
GenericName=Digital Audio Workstation
|
||||||
|
Comment=Multitrack harddisk recorder
|
||||||
|
Exec=$out/bin/ardour3
|
||||||
|
Icon=$out/share/ardour3/icons/ardour_icon_256px.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
X-MultipleArgs=false
|
||||||
|
Categories=GTK;Audio;AudioVideoEditing;AudioVideo;Video;
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Multi-track hard disk recording software";
|
||||||
|
longDescription = ''
|
||||||
|
Ardour is a digital audio workstation (DAW), You can use it to
|
||||||
|
record, edit and mix multi-track audio and midi. Produce your
|
||||||
|
own CDs. Mix video soundtracks. Experiment with new ideas about
|
||||||
|
music and sound.
|
||||||
|
|
||||||
|
Please consider supporting the ardour project financially:
|
||||||
|
https://community.ardour.org/node/8288
|
||||||
|
'';
|
||||||
|
homepage = http://ardour.org/;
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.goibhniu ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,9 +1,11 @@
|
|||||||
{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
|
{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, dbus, fftw
|
||||||
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jack2
|
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jack2
|
||||||
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
||||||
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
||||||
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
|
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
|
||||||
, perl, pkgconfig, python, serd, sord, sratom, suil }:
|
, perl, pkgconfig, python, rubberband, serd, sord, sratom, suil, taglib
|
||||||
|
, vampSDK
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -15,11 +17,11 @@ let
|
|||||||
# "git describe" when _not_ on an annotated tag(!): MAJOR.MINOR-REV-HASH.
|
# "git describe" when _not_ on an annotated tag(!): MAJOR.MINOR-REV-HASH.
|
||||||
|
|
||||||
# Version to build.
|
# Version to build.
|
||||||
tag = "3.5.403";
|
tag = "4.0";
|
||||||
|
|
||||||
# Version info that is built into the binary. Keep in sync with 'tag'. The
|
# Version info that is built into the binary. Keep in sync with 'tag'. The
|
||||||
# last 8 digits is a (fake) commit id.
|
# last 8 digits is a (fake) commit id.
|
||||||
revision = "3.5-403-00000000";
|
revision = "4.0-e1aa66cb3f";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -28,17 +30,18 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = git://git.ardour.org/ardour/ardour.git;
|
url = git://git.ardour.org/ardour/ardour.git;
|
||||||
rev = "refs/tags/${tag}";
|
rev = "e1aa66cb3f";
|
||||||
sha256 = "0k1z8sbjf88dqn12kf9cykrqj38vkr879n2g6b4adk6cghn8wz3x";
|
sha256 = "396668fb9116a68f5079f0d880930e890fd0cdf7ee5f3b97fcf44b88cf840b4c";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [
|
||||||
[ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
|
alsaLib aubio boost cairomm curl dbus fftw fftwSinglePrec flac
|
||||||
glibmm gtk gtkmm jack2 libgnomecanvas libgnomecanvasmm liblo
|
glibc glibmm gtk gtkmm jack2 libgnomecanvas libgnomecanvasmm liblo
|
||||||
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
||||||
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
|
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
|
||||||
makeWrapper pango perl pkgconfig python serd sord sratom suil
|
makeWrapper pango perl pkgconfig python rubberband serd sord
|
||||||
];
|
sratom suil taglib vampSDK
|
||||||
|
];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${revision}\"; }\n' > libs/ardour/revision.cc
|
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${revision}\"; }\n' > libs/ardour/revision.cc
|
||||||
@ -47,7 +50,7 @@ stdenv.mkDerivation rec {
|
|||||||
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
|
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = "python waf configure --optimize --prefix=$out";
|
configurePhase = "python waf configure --with-backend=alsa,jack --optimize --prefix=$out";
|
||||||
|
|
||||||
buildPhase = "python waf";
|
buildPhase = "python waf";
|
||||||
|
|
||||||
@ -57,17 +60,17 @@ stdenv.mkDerivation rec {
|
|||||||
python waf install
|
python waf install
|
||||||
mkdir -pv $out/gtk2/engines
|
mkdir -pv $out/gtk2/engines
|
||||||
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
|
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
|
||||||
wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
|
wrapProgram $out/bin/ardour4 --prefix GTK_PATH : $out/gtk2
|
||||||
|
|
||||||
# Install desktop file
|
# Install desktop file
|
||||||
mkdir -p "$out/share/applications"
|
mkdir -p "$out/share/applications"
|
||||||
cat > "$out/share/applications/ardour.desktop" << EOF
|
cat > "$out/share/applications/ardour.desktop" << EOF
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Ardour 3
|
Name=Ardour 4
|
||||||
GenericName=Digital Audio Workstation
|
GenericName=Digital Audio Workstation
|
||||||
Comment=Multitrack harddisk recorder
|
Comment=Multitrack harddisk recorder
|
||||||
Exec=$out/bin/ardour3
|
Exec=$out/bin/ardour4
|
||||||
Icon=$out/share/ardour3/icons/ardour_icon_256px.png
|
Icon=$out/share/ardour4/icons/ardour_icon_256px.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
X-MultipleArgs=false
|
X-MultipleArgs=false
|
||||||
@ -78,7 +81,13 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Multi-track hard disk recording software";
|
description = "Multi-track hard disk recording software";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Also read "The importance of Paying Something" on their homepage, please!
|
Ardour is a digital audio workstation (DAW), You can use it to
|
||||||
|
record, edit and mix multi-track audio and midi. Produce your
|
||||||
|
own CDs. Mix video soundtracks. Experiment with new ideas about
|
||||||
|
music and sound.
|
||||||
|
|
||||||
|
Please consider supporting the ardour project financially:
|
||||||
|
https://community.ardour.org/node/8288
|
||||||
'';
|
'';
|
||||||
homepage = http://ardour.org/;
|
homepage = http://ardour.org/;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
22
pkgs/applications/audio/artyFX/default.nix
Normal file
22
pkgs/applications/audio/artyFX/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ stdenv, fetchgit, cairomm, cmake, jack2, libpthreadstubs, libXdmcp, libxshmfence, libsndfile, lv2, ntk, pkgconfig }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "artyFX-git-${version}";
|
||||||
|
version = "2015-05-07";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/harryhaaren/openAV-ArtyFX.git";
|
||||||
|
rev = "3a8cb9a5e4ffaf27a497a31cc9cd6f2e79622d5b";
|
||||||
|
sha256 = "2e3f6ab6f829c0ec177e85f4e419286616cf35fb7303445caa09d3438cac27d5";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ cairomm cmake jack2 libpthreadstubs libXdmcp libxshmfence libsndfile lv2 ntk pkgconfig ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://openavproductions.com/artyfx/;
|
||||||
|
description = "A LV2 plugin bundle of artistic realtime effects";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
[ cmake ]
|
[ cmake ]
|
||||||
++ stdenv.lib.optional withQt4 qt4
|
++ stdenv.lib.optional withQt4 qt4
|
||||||
++ stdenv.lib.optional withQt5 qt5
|
++ stdenv.lib.optionals withQt5 (with qt5; [ base svg tools ])
|
||||||
++ stdenv.lib.optional withKDE4 kde4.kdelibs
|
++ stdenv.lib.optional withKDE4 kde4.kdelibs
|
||||||
++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
|
++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
|
||||||
++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
|
++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
|
||||||
|
@ -2,14 +2,25 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cdparanoia-III-10.2";
|
name = "cdparanoia-III-10.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://downloads.xiph.org/releases/cdparanoia/${name}.src.tgz";
|
url = "http://downloads.xiph.org/releases/cdparanoia/${name}.src.tgz";
|
||||||
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
|
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = "unset CC";
|
preConfigure = "unset CC";
|
||||||
|
|
||||||
|
patches = stdenv.lib.optionals stdenv.isDarwin [
|
||||||
|
(fetchurl {
|
||||||
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch";
|
||||||
|
sha1 = "c86e573f51e6d58d5f349b22802a7a7eeece9fcd";
|
||||||
|
})
|
||||||
|
(fetchurl {
|
||||||
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff";
|
||||||
|
sha1 = "d7dc121374df3b82e82adf544df7bf1eec377bdb";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://xiph.org/paranoia;
|
homepage = http://xiph.org/paranoia;
|
||||||
description = "A tool and library for reading digital audio from CDs";
|
description = "A tool and library for reading digital audio from CDs";
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
From ec580cb815c16ec1ab43a469d5af7d51d8d03082 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chocobozzz <florian.chocobo@gmail.com>
|
||||||
|
Date: Wed, 16 Jul 2014 15:57:25 +0200
|
||||||
|
Subject: [PATCH] No namespaces for DBus interfaces. Fixes #4401
|
||||||
|
|
||||||
|
---
|
||||||
|
src/CMakeLists.txt | 9 ++++-----
|
||||||
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||||
|
index 650fa74..775b0a5 100644
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -892,11 +892,6 @@ optional_source(LINUX SOURCES widgets/osd_x11.cpp)
|
||||||
|
if(HAVE_DBUS)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dbus)
|
||||||
|
|
||||||
|
- # Hack to get it to generate interfaces without namespaces - required
|
||||||
|
- # because otherwise org::freedesktop::UDisks and
|
||||||
|
- # org::freedesktop::UDisks::Device conflict.
|
||||||
|
- list(APPEND QT_DBUSXML2CPP_EXECUTABLE -N)
|
||||||
|
-
|
||||||
|
# MPRIS DBUS interfaces
|
||||||
|
qt4_add_dbus_adaptor(SOURCES
|
||||||
|
dbus/org.freedesktop.MediaPlayer.player.xml
|
||||||
|
@@ -964,6 +959,10 @@ if(HAVE_DBUS)
|
||||||
|
|
||||||
|
# DeviceKit DBUS interfaces
|
||||||
|
if(HAVE_DEVICEKIT)
|
||||||
|
+ set_source_files_properties(dbus/org.freedesktop.UDisks.xml
|
||||||
|
+ PROPERTIES NO_NAMESPACE dbus/udisks)
|
||||||
|
+ set_source_files_properties(dbus/org.freedesktop.UDisks.Device.xml
|
||||||
|
+ PROPERTIES NO_NAMESPACE dbus/udisksdevice)
|
||||||
|
qt4_add_dbus_interface(SOURCES
|
||||||
|
dbus/org.freedesktop.UDisks.xml
|
||||||
|
dbus/udisks)
|
@ -0,0 +1,25 @@
|
|||||||
|
From d9ebe7ec09a48b1ea505ccc33686b72642f083f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Tuegel <ttuegel@gmail.com>
|
||||||
|
Date: Mon, 4 May 2015 19:59:38 -0500
|
||||||
|
Subject: [PATCH] Runtime selection of Spotify blob
|
||||||
|
|
||||||
|
---
|
||||||
|
src/internet/spotifyservice.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/internet/spotifyservice.cpp b/src/internet/spotifyservice.cpp
|
||||||
|
index 543744e..d987a36 100644
|
||||||
|
--- a/src/internet/spotifyservice.cpp
|
||||||
|
+++ b/src/internet/spotifyservice.cpp
|
||||||
|
@@ -65,7 +65,7 @@ SpotifyService::SpotifyService(Application* app, InternetModel* parent)
|
||||||
|
system_blob_path_ = QCoreApplication::applicationDirPath() +
|
||||||
|
"/../PlugIns/clementine-spotifyblob";
|
||||||
|
#else
|
||||||
|
- system_blob_path_ = QCoreApplication::applicationDirPath() +
|
||||||
|
+ system_blob_path_ = qgetenv("CLEMENTINE_SPOTIFYBLOB") +
|
||||||
|
"/clementine-spotifyblob" CMAKE_EXECUTABLE_SUFFIX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--
|
||||||
|
2.3.6
|
||||||
|
|
@ -1,20 +1,25 @@
|
|||||||
{ stdenv, fetchurl, boost, cmake, gettext, gstreamer, gst_plugins_base
|
{ stdenv, fetchurl, boost, cmake, gettext, gstreamer, gst_plugins_base
|
||||||
, gst_plugins_good, gst_plugins_bad, gst_plugins_ugly, gst_ffmpeg
|
|
||||||
, liblastfm, qt4, taglib, fftw, glew, qjson, sqlite, libgpod, libplist
|
, liblastfm, qt4, taglib, fftw, glew, qjson, sqlite, libgpod, libplist
|
||||||
, usbmuxd, libmtp, gvfs, libcdio, protobuf, libspotify, qca2, pkgconfig
|
, usbmuxd, libmtp, gvfs, libcdio, libspotify, protobuf, qca2, pkgconfig
|
||||||
, sparsehash, config, makeWrapper }:
|
, sparsehash, config, makeWrapper, runCommand, gst_plugins }:
|
||||||
|
|
||||||
let withSpotify = config.clementine.spotify or false;
|
let
|
||||||
in
|
withSpotify = config.clementine.spotify or false;
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "clementine-1.2.3";
|
version = "1.2.3";
|
||||||
|
|
||||||
|
exeName = "clementine";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = https://github.com/clementine-player/Clementine/archive/1.2.3.tar.gz;
|
url = https://github.com/clementine-player/Clementine/archive/1.2.3.tar.gz;
|
||||||
sha256 = "1gx1109i4pylz6x7gvp4rdzc6dvh0w6in6hfbygw01d08l26bxbx";
|
sha256 = "1gx1109i4pylz6x7gvp4rdzc6dvh0w6in6hfbygw01d08l26bxbx";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./clementine-1.2.1-include-paths.patch ];
|
patches = [
|
||||||
|
./clementine-1.2.1-include-paths.patch
|
||||||
|
./clementine-dbus-namespace.patch
|
||||||
|
./clementine-spotify-blob.patch
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
@ -23,9 +28,6 @@ stdenv.mkDerivation {
|
|||||||
gettext
|
gettext
|
||||||
glew
|
glew
|
||||||
gst_plugins_base
|
gst_plugins_base
|
||||||
gst_plugins_good
|
|
||||||
gst_plugins_ugly
|
|
||||||
gst_ffmpeg
|
|
||||||
gstreamer
|
gstreamer
|
||||||
gvfs
|
gvfs
|
||||||
libcdio
|
libcdio
|
||||||
@ -33,7 +35,6 @@ stdenv.mkDerivation {
|
|||||||
liblastfm
|
liblastfm
|
||||||
libmtp
|
libmtp
|
||||||
libplist
|
libplist
|
||||||
makeWrapper
|
|
||||||
pkgconfig
|
pkgconfig
|
||||||
protobuf
|
protobuf
|
||||||
qca2
|
qca2
|
||||||
@ -43,22 +44,77 @@ stdenv.mkDerivation {
|
|||||||
sqlite
|
sqlite
|
||||||
taglib
|
taglib
|
||||||
usbmuxd
|
usbmuxd
|
||||||
] ++ stdenv.lib.optional withSpotify libspotify;
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
free = stdenv.mkDerivation {
|
||||||
|
name = "clementine-free-${version}";
|
||||||
|
inherit patches src buildInputs;
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "http://www.clementine-player.org";
|
||||||
|
description = "A multiplatform music player";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.ttuegel ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
postInstall = ''
|
# Spotify blob for Clementine
|
||||||
wrapProgram $out/bin/clementine \
|
blob = stdenv.mkDerivation {
|
||||||
--set GST_PLUGIN_SYSTEM_PATH "$GST_PLUGIN_SYSTEM_PATH"
|
name = "clementine-blob-${version}";
|
||||||
'';
|
# Use the same patches and sources as Clementine
|
||||||
|
inherit patches src;
|
||||||
|
buildInputs = buildInputs ++ [ libspotify ];
|
||||||
|
# Only build and install the Spotify blob
|
||||||
|
preBuild = ''
|
||||||
|
cd ext/clementine-spotifyblob
|
||||||
|
'';
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/libexec/clementine
|
||||||
|
mv $out/bin/clementine-spotifyblob $out/libexec/clementine
|
||||||
|
rmdir $out/bin
|
||||||
|
'';
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "http://www.clementine-player.org";
|
||||||
|
description = "Spotify integration for Clementine";
|
||||||
|
# The blob itself is Apache-licensed, although libspotify is unfree.
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.ttuegel ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
in
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
runCommand "clementine-${version}"
|
||||||
|
{
|
||||||
|
inherit blob free;
|
||||||
|
buildInputs = [ makeWrapper ] ++ gst_plugins; # for the setup-hooks
|
||||||
|
dontPatchELF = true;
|
||||||
|
dontStrip = true;
|
||||||
|
meta = {
|
||||||
homepage = "http://www.clementine-player.org";
|
homepage = "http://www.clementine-player.org";
|
||||||
description = "A multiplatform music player";
|
description = "A multiplatform music player"
|
||||||
|
+ " (" + (optionalString withSpotify "with Spotify, ")
|
||||||
|
+ "with gstreamer plugins: "
|
||||||
|
+ concatStrings (intersperse ", " (map (x: x.name) gst_plugins))
|
||||||
|
+ ")";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.ttuegel ];
|
maintainers = [ maintainers.ttuegel ];
|
||||||
# libspotify is unfree
|
|
||||||
hydraPlatforms = optionals (!withSpotify) platforms.linux;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper "$free/bin/${exeName}" "$out/bin/${exeName}" \
|
||||||
|
${optionalString withSpotify "--set CLEMENTINE_SPOTIFYBLOB \"$blob/libexec/clementine\""} \
|
||||||
|
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
|
||||||
|
|
||||||
|
mkdir -p $out/share
|
||||||
|
for dir in applications icons kde4; do
|
||||||
|
ln -s "$free/share/$dir" "$out/share/$dir"
|
||||||
|
done
|
||||||
|
''
|
||||||
|
21
pkgs/applications/audio/dirt/default.nix
Normal file
21
pkgs/applications/audio/dirt/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, libsndfile, libsamplerate, liblo, jack2 }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "dirt-git";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
repo = "Dirt";
|
||||||
|
owner = "tidalcycles";
|
||||||
|
rev = "cfc5e85318defda7462192b5159103c823ce61f7";
|
||||||
|
sha256 = "1shbyp54q64g6bsl6hhch58k3z1dyyy9ph6cq2xvdf8syy00sisz";
|
||||||
|
};
|
||||||
|
buildInputs = [ libsndfile libsamplerate liblo jack2 ];
|
||||||
|
configurePhase = ''
|
||||||
|
export DESTDIR=$out
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "An unimpressive thingie for playing bits of samples with some level of accuracy";
|
||||||
|
homepage = "https://github.com/tidalcycles/Dirt";
|
||||||
|
license = stdenv.lib.licenses.gpl3;
|
||||||
|
};
|
||||||
|
}
|
@ -2,12 +2,12 @@
|
|||||||
, libxslt, lv2, pkgconfig, premake3, xlibs }:
|
, libxslt, lv2, pkgconfig, premake3, xlibs }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "distrho-ports-git-2015-01-28";
|
name = "distrho-ports-git-2015-05-04";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/DISTRHO/DISTRHO-Ports.git";
|
url = "https://github.com/DISTRHO/DISTRHO-Ports.git";
|
||||||
rev = "b4e2dc24802fe6804c60fcd2559a0bca46b7709c";
|
rev = "3f13db5dc7722ed0dcbb5256d7fac1ac9165c2d8";
|
||||||
sha256 = "661ff6f7cda71a8dd08cbcea3f560e99f0fc2232053cbc9a2aaba854137805c6";
|
sha256 = "6f740f6a8af714436ef75b858944e8122490a2faa04591a201105e84bca42fa0";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
@ -22,13 +22,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
sh ./scripts/premake-update.sh linux
|
sh ./scripts/premake-update.sh linux
|
||||||
make standalone
|
|
||||||
make lv2
|
make lv2
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp bin/standalone/* $out/bin/
|
|
||||||
mkdir -p $out/lib/lv2
|
mkdir -p $out/lib/lv2
|
||||||
cp -a bin/lv2/* $out/lib/lv2/
|
cp -a bin/lv2/* $out/lib/lv2/
|
||||||
'';
|
'';
|
||||||
@ -38,18 +36,14 @@ stdenv.mkDerivation rec {
|
|||||||
description = "A collection of cross-platform audio effects and plugins";
|
description = "A collection of cross-platform audio effects and plugins";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Includes:
|
Includes:
|
||||||
3BandEQ bitmangler drowaudio-distortion drowaudio-flanger
|
Dexed drowaudio-distortion drowaudio-distortionshaper drowaudio-flanger
|
||||||
drowaudio-tremolo eqinox juce_pitcher sDelay TAL-Filter
|
drowaudio-reverb drowaudio-tremolo drumsynt EasySSP eqinox
|
||||||
TAL-NoiseMaker TAL-Reverb-2 TAL-Vocoder-2 ThePilgrim
|
JuceDemoPlugin klangfalter LUFSMeter luftikus obxd pitchedDelay
|
||||||
Wolpertinger argotlunar capsaicin drowaudio-distortionshaper
|
stereosourceseparation TAL-Dub-3 TAL-Filter TAL-Filter-2 TAL-NoiseMaker
|
||||||
drowaudio-reverb drumsynth highlife JuceDemoPlugin PingPongPan
|
TAL-Reverb TAL-Reverb-2 TAL-Reverb-3 TAL-Vocoder-2 TheFunction
|
||||||
TAL-Dub-3 TAL-Filter-2 TAL-Reverb TAL-Reverb-3 TheFunction vex
|
ThePilgrim Vex Wolpertinger
|
||||||
'';
|
'';
|
||||||
maintainers = [ maintainers.goibhniu ];
|
maintainers = [ maintainers.goibhniu ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
||||||
# The old repo was removed and split into multiple repos. More
|
|
||||||
# work is required to get everything to build and work.
|
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, intltool, gtk3, glib, libid3tag, id3lib, taglib
|
{ stdenv, fetchurl, pkgconfig, intltool, gtk3, glib, libid3tag, id3lib, taglib
|
||||||
, libvorbis, libogg, flac, itstool, libxml2, gsettings_desktop_schemas
|
, libvorbis, libogg, flac, itstool, libxml2, gsettings_desktop_schemas
|
||||||
, makeWrapper, gnome_icon_theme, dconf
|
, makeWrapper, gnome3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
preFixup = ''
|
preFixup = ''
|
||||||
wrapProgram $out/bin/easytag \
|
wrapProgram $out/bin/easytag \
|
||||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:$out/share" \
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:$out/share" \
|
||||||
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
|
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_LDFLAGS = "-lid3tag -lz";
|
NIX_LDFLAGS = "-lid3tag -lz";
|
||||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgconfig intltool gtk3 glib libid3tag id3lib taglib libvorbis libogg flac
|
pkgconfig intltool gtk3 glib libid3tag id3lib taglib libvorbis libogg flac
|
||||||
itstool libxml2 gsettings_desktop_schemas gnome_icon_theme dconf
|
itstool libxml2 gsettings_desktop_schemas gnome3.defaultIconTheme gnome3.dconf
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
27
pkgs/applications/audio/fomp/default.nix
Normal file
27
pkgs/applications/audio/fomp/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ stdenv, fetchurl, lv2, pkgconfig, python }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "fomp-${version}";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://download.drobilla.net/${name}.tar.bz2";
|
||||||
|
sha256 = "1hh2xhknanqn3iwp12ihl6bf8p7bqxryms9qk7mh21lixl42b8k5";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ lv2 pkgconfig python ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
python waf configure --prefix=$out
|
||||||
|
python waf
|
||||||
|
python waf install
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://drobilla.net/software/fomp/;
|
||||||
|
description = "An LV2 port of the MCP, VCO, FIL, and WAH plugins by Fons Adriaensen";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchsvn, pkgconfig, autoconf, automake, gnutls, freetype
|
{ stdenv, fetchsvn, pkgconfig, autoconf, automake, gnutls33, freetype
|
||||||
, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, jack2, libvorbis
|
, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, jack2, libvorbis
|
||||||
, libsndfile, libogg
|
, libsndfile, libogg
|
||||||
}:
|
}:
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgconfig autoconf automake gnutls freetype SDL SDL_gfx SDL_ttf
|
pkgconfig autoconf automake gnutls33 freetype SDL SDL_gfx SDL_ttf
|
||||||
liblo libxml2 jack2 alsaLib libvorbis libsndfile libogg
|
liblo libxml2 jack2 alsaLib libvorbis libsndfile libogg
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ pkgs, stdenv, fetchurl, python, buildPythonPackage, pythonPackages, mygpoclient, intltool,
|
{ pkgs, stdenv, fetchurl, python, buildPythonPackage, pythonPackages, mygpoclient, intltool,
|
||||||
ipodSupport ? true, libgpod, gnome3, hicolor_icon_theme }:
|
ipodSupport ? true, libgpod, gnome3 }:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
@ -16,8 +16,7 @@ in buildPythonPackage rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
coverage feedparser minimock sqlite3 mygpoclient intltool
|
coverage feedparser minimock sqlite3 mygpoclient intltool
|
||||||
gnome3.gnome_themes_standard gnome3.gnome_icon_theme
|
gnome3.gnome_themes_standard gnome3.defaultIconTheme
|
||||||
gnome3.gnome_icon_theme_symbolic hicolor_icon_theme
|
|
||||||
gnome3.gsettings_desktop_schemas
|
gnome3.gsettings_desktop_schemas
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ pkgconfig makeWrapper intltool curl gettext perl perlXMLParser
|
buildInputs = [ pkgconfig makeWrapper intltool curl gettext perl perlXMLParser
|
||||||
flex libgpod libid3tag flac libvorbis gtk3 gdk_pixbuf libglade gnome.anjuta
|
flex libgpod libid3tag flac libvorbis gtk3 gdk_pixbuf libglade gnome.anjuta
|
||||||
gnome.gdl gnome.gnome_icon_theme_symbolic gnome.gnome_icon_theme
|
gnome.gdl gnome.defaultIconTheme
|
||||||
hicolor_icon_theme ];
|
hicolor_icon_theme ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
@ -1,24 +1,27 @@
|
|||||||
{ stdenv, fetchsvn, boost, ganv, glibmm, gtk, gtkmm, jack2, lilv
|
{ stdenv, fetchsvn, boost, ganv, glibmm, gtk, gtkmm, jack2, lilv-svn
|
||||||
, lv2, makeWrapper, pkgconfig, python, raul, rdflib, serd, sord, sratom
|
, lv2, makeWrapper, pkgconfig, python, raul, rdflib, serd, sord-svn, sratom
|
||||||
, suil
|
, suil
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ingen-svn-${rev}";
|
name = "ingen-svn-${rev}";
|
||||||
rev = "5490";
|
rev = "5675";
|
||||||
|
|
||||||
src = fetchsvn {
|
src = fetchsvn {
|
||||||
url = "http://svn.drobilla.net/lad/trunk/ingen";
|
url = "http://svn.drobilla.net/lad/trunk/ingen";
|
||||||
rev = rev;
|
rev = rev;
|
||||||
sha256 = "09h2mrkzpwzhhyqy21xr7jhfbl82gmqfyj0lzhnjsrab8z56yzk6";
|
sha256 = "1dk56rzbc0rwlbzr90rv8bh5163xwld32nmkvcz7ajfchi4fnv86";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost ganv glibmm gtk gtkmm jack2 lilv lv2 makeWrapper pkgconfig
|
boost ganv glibmm gtk gtkmm jack2 lilv-svn lv2 makeWrapper pkgconfig
|
||||||
python raul serd sord sratom suil
|
python raul serd sord-svn sratom suil
|
||||||
];
|
];
|
||||||
|
|
||||||
configurePhase = "python waf configure --prefix=$out";
|
configurePhase = ''
|
||||||
|
sed -e "s@{PYTHONDIR}/'@out/'@" -i wscript
|
||||||
|
python waf configure --prefix=$out
|
||||||
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ rdflib ];
|
propagatedBuildInputs = [ rdflib ];
|
||||||
|
|
||||||
|
40
pkgs/applications/audio/ir.lv2/default.nix
Normal file
40
pkgs/applications/audio/ir.lv2/default.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ stdenv, fetchurl, gtk, lv2, libsamplerate, libsndfile, pkgconfig, zita-convolver }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "ir.lv2-${version}";
|
||||||
|
version = "1.2.2";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://factorial.hu/system/files/${name}.tar.gz";
|
||||||
|
sha256 = "17a6h2mv9xv41jpbx6bdakkngin4kqzh2v67l4076ddq609k5a7v";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ gtk lv2 libsamplerate libsndfile pkgconfig zita-convolver ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
make
|
||||||
|
make convert4chan
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir "$out/bin"
|
||||||
|
mkdir "$out/include"
|
||||||
|
mkdir "$out/share"
|
||||||
|
mkdir "$out/share/doc"
|
||||||
|
|
||||||
|
make PREFIX="$out" install
|
||||||
|
install -Dm755 convert4chan "$out/bin/convert4chan"
|
||||||
|
# fixed location
|
||||||
|
sed -i 's/, but seem like its gone://' README
|
||||||
|
sed -i 's@rhythminmind.net/1313@rhythminmind.net/STN@' README
|
||||||
|
install -Dm644 README "$out/share/doc/README"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://factorial.hu/plugins/lv2/ir;
|
||||||
|
description = "Zero-latency, realtime, high performance signal convolver especially for creating reverb effects";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# TODO: upgrade libav when "Audio sample format conversion failed" is fixed
|
# TODO: upgrade libav when "Audio sample format conversion failed" is fixed
|
||||||
buildInputs = [ libav_0_8 libkeyfinder qt5 taglib ];
|
buildInputs = [ libav_0_8 libkeyfinder qt5.base qt5.xmlpatterns taglib ];
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
substituteInPlace is_KeyFinder.pro \
|
substituteInPlace is_KeyFinder.pro \
|
||||||
|
28
pkgs/applications/audio/ladspa-sdk/default.nix
Normal file
28
pkgs/applications/audio/ladspa-sdk/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ stdenv, fetchurl }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "ladspa-sdk-${version}";
|
||||||
|
version = "1.13";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
|
||||||
|
sha256 = "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm";
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
cd src
|
||||||
|
sed -i 's@/usr/@$(out)/@g' makefile
|
||||||
|
sed -i 's@-mkdirhier@mkdir -p@g' makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "The SDK for the LADSPA audio plugin standard";
|
||||||
|
longDescription = ''
|
||||||
|
The LADSPA SDK, including the ladspa.h API header file,
|
||||||
|
ten example LADSPA plugins and
|
||||||
|
three example programs (applyplugin, analyseplugin and listplugins).
|
||||||
|
'';
|
||||||
|
homepage = http://www.ladspa.org/ladspa_sdk/overview.html;
|
||||||
|
license = stdenv.lib.licenses.lgpl2;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.magnetophon ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
makeWrapper cmake qt5 pkgconfig alsaLib portaudio jack2 lame libsndfile libvorbis
|
makeWrapper cmake qt5.base pkgconfig alsaLib portaudio jack2 lame libsndfile libvorbis
|
||||||
];
|
];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ pulseaudio gtkmm3 libcanberra_gtk3 makeWrapper
|
buildInputs = [ pulseaudio gtkmm3 libcanberra_gtk3 makeWrapper
|
||||||
gnome3.gnome_icon_theme ];
|
gnome3.defaultIconTheme ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig intltool ];
|
nativeBuildInputs = [ pkgconfig intltool ];
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configurePhase = "export CC=${CC}";
|
configurePhase = "export CC=${CC}";
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "A console front-end for Pandora.com";
|
description = "A console front-end for Pandora.com";
|
||||||
homepage = "http://6xq.net/projects/pianobar/";
|
homepage = "http://6xq.net/projects/pianobar/";
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = stdenv.lib.licenses.mit; # expat version
|
license = licenses.mit; # expat version
|
||||||
maintainers = stdenv.lib.maintainers.eduarrrd;
|
maintainers = with maintainers; [ eduarrrd ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
28
pkgs/applications/audio/plugin-torture/default.nix
Normal file
28
pkgs/applications/audio/plugin-torture/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ stdenv, fetchgit, boost, ladspaH, lilv, lv2, pkgconfig, serd, sord, sratom }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "plugin-torture-git-${version}";
|
||||||
|
version = "2013-10-03";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/cth103/plugin-torture";
|
||||||
|
rev = "9ee06016982bdfbaa215cd0468cc6ada6367462a";
|
||||||
|
sha256 = "bfe9213fd2c1451d7acc1381d63301c4e6ff69ce86d31a886ece5159ba850706";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ boost ladspaH lilv lv2 pkgconfig serd sord sratom ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp plugin-torture $out/bin/
|
||||||
|
cp README $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/cth103/plugin-torture;
|
||||||
|
description = "A tool to test LADSPA and LV2 plugins";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ libsndfile qt5 fftw /* should be fftw3f ??*/ bzip2 librdf rubberband
|
[ libsndfile qt5.base fftw /* should be fftw3f ??*/ bzip2 librdf rubberband
|
||||||
libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland
|
libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland
|
||||||
serd
|
serd
|
||||||
sord
|
sord
|
||||||
|
26
pkgs/applications/audio/sorcer/default.nix
Normal file
26
pkgs/applications/audio/sorcer/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ stdenv, fetchurl, boost, cairomm, cmake, libsndfile, lv2, ntk, pkgconfig, python }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "sorcer-${version}";
|
||||||
|
version = "1.1.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/harryhaaren/openAV-Sorcer/archive/release-${version}.tar.gz";
|
||||||
|
sha256 = "1jkhs2rhn4givac7rlbj8067r7qq6jnj3ixabb346nw7pd6gn1wn";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ boost cairomm cmake libsndfile lv2 ntk pkgconfig python ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
make install
|
||||||
|
cp -a ../presets/* "$out/lib/lv2"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://openavproductions.com/sorcer/;
|
||||||
|
description = "A wavetable LV2 plugin synth, targeted at the electronic / dubstep genre";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -1,30 +0,0 @@
|
|||||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
|
||||||
|
|
||||||
{ cabal, c2hs, dataDefault, deepseq, filepath, hspec
|
|
||||||
, hspecExpectations, libmpd, mtl, ncurses, QuickCheck, time
|
|
||||||
, transformers, utf8String, wcwidth
|
|
||||||
}:
|
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
|
||||||
pname = "vimus";
|
|
||||||
version = "0.2.0";
|
|
||||||
sha256 = "0s7hfyil9rnr9rmjb08g1l1sxybx3qdkw2f59p433fkdjp2m140h";
|
|
||||||
isLibrary = true;
|
|
||||||
isExecutable = true;
|
|
||||||
buildDepends = [
|
|
||||||
dataDefault deepseq filepath libmpd mtl time utf8String wcwidth
|
|
||||||
];
|
|
||||||
testDepends = [
|
|
||||||
dataDefault hspec hspecExpectations mtl QuickCheck transformers
|
|
||||||
wcwidth
|
|
||||||
];
|
|
||||||
buildTools = [ c2hs ];
|
|
||||||
extraLibraries = [ ncurses ];
|
|
||||||
meta = {
|
|
||||||
description = "An MPD client with vim-like key bindings";
|
|
||||||
license = self.stdenv.lib.licenses.mit;
|
|
||||||
platforms = self.ghc.meta.platforms;
|
|
||||||
maintainers = with self.stdenv.lib.maintainers; [ jzellner ];
|
|
||||||
broken = self.stdenv.isLinux && self.stdenv.isi686;
|
|
||||||
};
|
|
||||||
})
|
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
sed -e "s@/usr/local@$out@" -i Makefile
|
sed -e "s@/usr/local@$out@" -i Makefile
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "TKLIB=-ltk8.5" "TCLLIB=-ltcl8.5" ];
|
makeFlags = [ "TKLIB=-l${tk.libPrefix}" "TCLLIB=-l${tcl.libPrefix}" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/vkeybd --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
|
wrapProgram $out/bin/vkeybd --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
|
||||||
|
30
pkgs/applications/audio/x42-plugins/default.nix
Normal file
30
pkgs/applications/audio/x42-plugins/default.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ stdenv, fetchurl, fetchgit, ftgl, freefont_ttf, jack2, mesa_glu, pkgconfig
|
||||||
|
, libltc, libsndfile, libsamplerate
|
||||||
|
, lv2, mesa, gtk2, cairo, pango, fftwFloat, zita-convolver }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "2014-11-01";
|
||||||
|
name = "x42-plugins-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://gareus.org/misc/x42-plugins/x42-plugins-20141101.tar.xz";
|
||||||
|
sha256 = "0pjdhj58hb4n2053v92l7v7097fjm4xzrl8ks4g1hc7miy98ymdk";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ mesa_glu ftgl freefont_ttf jack2 libltc libsndfile libsamplerate lv2 mesa gtk2 cairo pango fftwFloat pkgconfig zita-convolver];
|
||||||
|
|
||||||
|
makeFlags = [ "PREFIX=$(out)" "FONTFILE=${freefont_ttf}/share/fonts/truetype/FreeSansBold.ttf" ];
|
||||||
|
|
||||||
|
# remove check for zita-convolver in /usr/
|
||||||
|
patchPhase = ''
|
||||||
|
sed -i "38,42d" convoLV2/Makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib;
|
||||||
|
{ description = "Collection of LV2 plugins by Robin Gareus";
|
||||||
|
homepage = https://github.com/x42/x42-plugins;
|
||||||
|
maintainers = with maintainers; [ magnetophon ];
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, alsaLib, libxmp }:
|
{ stdenv, fetchurl, pkgconfig, alsaLib, libxmp }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "xmp-4.0.7";
|
name = "xmp-4.0.10";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Extended module player";
|
description = "Extended module player";
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/xmp/xmp/${name}.tar.gz";
|
url = "mirror://sourceforge/xmp/xmp/${name}.tar.gz";
|
||||||
sha256 = "0qgzzaxhshz5l7s21x89xb43pbbi0zap6a4lk4s7gjp1qca2agcw";
|
sha256 = "0gjylvvmq7ha0nhcjg56qfp0xxpsrcsj7y5r914svd5x1ppmzm5n";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig alsaLib libxmp ];
|
buildInputs = [ pkgconfig alsaLib libxmp ];
|
||||||
|
29
pkgs/applications/audio/zam-plugins/default.nix
Normal file
29
pkgs/applications/audio/zam-plugins/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ stdenv, fetchurl, boost, libX11, mesa, liblo, jack2, ladspaH, lv2, pkgconfig, rubberband, libsndfile }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "zam-plugins-${version}";
|
||||||
|
version = "3.5";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/zamaudio/zam-plugins/archive/${version}.tar.gz";
|
||||||
|
sha256 = "0icdrs4vaaj8gqi76jkkx5yk9h3agipa11cyb5h52y814q6mx6vm";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ boost libX11 mesa liblo jack2 ladspaH lv2 pkgconfig rubberband libsndfile ];
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
patchShebangs ./libs/generate-ttl.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"PREFIX=$(out)"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = http://www.zamaudio.com/?p=976;
|
||||||
|
description = "A collection of LV2/LADSPA/VST/JACK audio plugins by ZamAudio";
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -4,28 +4,27 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
ver_branch = "1.14";
|
ver_branch = "1.15";
|
||||||
version = "1.14.0";
|
version = "1.15.0";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lightdm-${version}";
|
name = "lightdm-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
|
||||||
sha256 = "0fkbzqncx34dhylrg5328fih7xywmsqj2p40smnx33nyf047jdgc";
|
sha256 = "0f0c2irb7qq49dabxhh99bwyvkxpfpscy4vynm7y800sz15lm2hs";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt
|
pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt
|
||||||
qt4 qt5
|
qt4
|
||||||
];
|
] ++ stdenv.lib.optional (qt5 != null) qt5.base;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-liblightdm-gobject"
|
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
] ++ stdenv.lib.optional (qt4 != null) "--enable-liblightdm-qt"
|
] ++ stdenv.lib.optional (qt4 != null) "--enable-liblightdm-qt"
|
||||||
++ stdenv.lib.optional (qt5 != null) "--enable-liblightdm-qt5";
|
++ stdenv.lib.optional ((qt5.base or null) != null) "--enable-liblightdm-qt5";
|
||||||
|
|
||||||
installFlags = [
|
installFlags = [
|
||||||
"sysconfdir=\${out}/etc"
|
"sysconfdir=\${out}/etc"
|
||||||
|
@ -298,7 +298,7 @@ in {
|
|||||||
};
|
};
|
||||||
"i686-linux" = fetchurl {
|
"i686-linux" = fetchurl {
|
||||||
url = http://download.eclipse.org/eclipse/downloads/drops4/R-4.4.2-201502041700/eclipse-SDK-4.4.2-linux-gtk.tar.gz;
|
url = http://download.eclipse.org/eclipse/downloads/drops4/R-4.4.2-201502041700/eclipse-SDK-4.4.2-linux-gtk.tar.gz;
|
||||||
sha256 = "9f4238ce9f887a1a57bbc6c6898e43357d14a6d74f59385327813c5e82aa735d";
|
sha256 = "1hacyjjwhhxi7r3xyhpqgjqpd5r0irw9bfkalz5s5l6shb0lq4i7";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,10 +10,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
|
|
||||||
patchPhase = ''
|
|
||||||
sed -i s/-lcurses/-lncurses/ configure
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
'';
|
'';
|
||||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://rudel.sourceforge.net/";
|
homepage = "http://rudel.sourceforge.net/";
|
||||||
description = "Rudel is a collaborative editing environment for GNU Emacs";
|
description = "A collaborative editing environment for GNU Emacs";
|
||||||
license = "GPL";
|
license = "GPL";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
{ cabal, emacs, haskellMode, haskellSrcExts }:
|
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
|
||||||
pname = "structured-haskell-mode";
|
|
||||||
version = "1.0.4";
|
|
||||||
sha256 = "1402wx27py7292ad7whsb13ywv71k36501jpfrn2p0v7knzknj8z";
|
|
||||||
isLibrary = false;
|
|
||||||
isExecutable = true;
|
|
||||||
buildDepends = [ haskellSrcExts haskellMode ];
|
|
||||||
buildTools = [ emacs ];
|
|
||||||
postInstall = ''
|
|
||||||
emacs -L elisp -L ${haskellMode}/share/emacs/site-lisp \
|
|
||||||
--batch -f batch-byte-compile "elisp/"*.el
|
|
||||||
install -d $out/share/emacs/site-lisp
|
|
||||||
install "elisp/"*.el "elisp/"*.elc $out/share/emacs/site-lisp
|
|
||||||
'';
|
|
||||||
meta = {
|
|
||||||
homepage = "https://github.com/chrisdone/structured-haskell-mode";
|
|
||||||
description = "Structured editing Emacs mode for Haskell";
|
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
|
||||||
platforms = self.ghc.meta.platforms;
|
|
||||||
};
|
|
||||||
})
|
|
@ -212,86 +212,86 @@ in
|
|||||||
|
|
||||||
android-studio = buildAndroidStudio rec {
|
android-studio = buildAndroidStudio rec {
|
||||||
name = "android-studio-${version}";
|
name = "android-studio-${version}";
|
||||||
version = "1.2.0.8";
|
version = "1.2.0.12";
|
||||||
build = "141.1845774";
|
build = "141.1890965";
|
||||||
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 = "1l201qv1aya1l9jrybgqclv2v2fgzdpcb6qsnxszcq3npplisw9h";
|
sha256 = "01k96rql192ksnprc4yai97fcals7msf06m9bx1q7asn46887h7n";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
clion = buildClion rec {
|
clion = buildClion rec {
|
||||||
name = "clion-${version}";
|
name = "clion-${version}";
|
||||||
version = "1.0";
|
version = "1.0.2";
|
||||||
build = "141.353";
|
build = "141.871";
|
||||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/cpp/${name}.tar.gz";
|
url = "https://download.jetbrains.com/cpp/${name}.tar.gz";
|
||||||
sha256 = "0xjdx13ljp1vy51a7rsj25wg3bsvry4kxq5cdng8zrc1g2y1fqw5";
|
sha256 = "1b9lsgl71pbcr5br0vkr2gn09b98dl9ykdxlqwzqpwnv7ckqcb69";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
idea-community = buildIdea rec {
|
idea-community = buildIdea rec {
|
||||||
name = "idea-community-${version}";
|
name = "idea-community-${version}";
|
||||||
version = "14.1.2";
|
version = "14.1.3";
|
||||||
build = "IC-141.713.2";
|
build = "IC-141.1010.3";
|
||||||
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 = "1skxbax7gsxxf7519qasxwp9q0v9ff755ibqr1w47dv2al47kjzq";
|
sha256 = "104ba057p49l41g9gdcgbywdxyqzkm4rfm7yivkcsddh5drsk4jv";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
idea-ultimate = buildIdea rec {
|
idea-ultimate = buildIdea rec {
|
||||||
name = "idea-ultimate-${version}";
|
name = "idea-ultimate-${version}";
|
||||||
version = "14.1.2";
|
version = "14.1.3";
|
||||||
build = "IU-141.713.2";
|
build = "IU-141.1010.3";
|
||||||
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 = "1ddy0f83rs3yx3w8v49cmlhkc8qxapdh702g26gzlapbpvfw58ay";
|
sha256 = "1flg3rpb86xfcxlys5rxywa0z9c6j9h3qd8mkadx5pnay1f97pwi";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ruby-mine = buildRubyMine rec {
|
ruby-mine = buildRubyMine rec {
|
||||||
name = "ruby-mine-${version}";
|
name = "ruby-mine-${version}";
|
||||||
version = "7.0.4";
|
version = "7.1.2";
|
||||||
build = "139.1231";
|
build = "141.1119";
|
||||||
description = "The Most Intelligent Ruby and Rails IDE";
|
description = "The Most Intelligent Ruby and Rails IDE";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||||
sha256 = "08b0iwccb5w9b1yk0kbs99r5mxkcyxqs9mkr57wb5j71an80yx38";
|
sha256 = "1gz14lv5jhnrnshp7lkx3wgrdf0y60abs4q78yhv2x9dc6ld1gmj";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pycharm-community = buildPycharm rec {
|
pycharm-community = buildPycharm rec {
|
||||||
name = "pycharm-community-${version}";
|
name = "pycharm-community-${version}";
|
||||||
version = "4.0.6";
|
version = "4.5";
|
||||||
build = "139.1659";
|
build = "141.1116";
|
||||||
description = "PyCharm 4.0 Community Edition";
|
description = "PyCharm Community Edition";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = stdenv.lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||||
sha256 = "16lf2slssfgbds6zyp2rs0ssrg8aw5d2w7b755iqimiyfhyyv83s";
|
sha256 = "0igx62rijalppsd1nwrri1r4m1597n93ncglyb6b94m3fm32fca6";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pycharm-professional = buildPycharm rec {
|
pycharm-professional = buildPycharm rec {
|
||||||
name = "pycharm-professional-${version}";
|
name = "pycharm-professional-${version}";
|
||||||
version = "4.0.6";
|
version = "4.5";
|
||||||
build = "139.1659";
|
build = "141.1116";
|
||||||
description = "PyCharm 4.0 Professional Edition";
|
description = "PyCharm Professional Edition";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||||
sha256 = "0wavw41nzqnx75y3k3l5kq09i5d9j8hb4r6a0y3nxzqvmdfza55r";
|
sha256 = "0zga8sxwrvjvyw9v1pvq40gasp485r1d627jj6jvwzcv78il50d9";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -309,13 +309,13 @@ in
|
|||||||
|
|
||||||
webstorm = buildWebStorm rec {
|
webstorm = buildWebStorm rec {
|
||||||
name = "webstorm-${version}";
|
name = "webstorm-${version}";
|
||||||
version = "9.0.3";
|
version = "10.0.2";
|
||||||
build = "139.1112";
|
build = "141.728";
|
||||||
description = "Professional IDE for Web and JavaScript devlopment";
|
description = "Professional IDE for Web and JavaScript devlopment";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
||||||
sha256 = "e4cfe7b5f1220b68d880c4f236df9c9df2b1efcc04775afad6149d949f45f0aa";
|
sha256 = "0ghv1r145qb5kmp2x375f5674b86d51w024fz390znlnniclizqx";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,49 +4,84 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "5.7.0.660";
|
version = "5.9.0.431";
|
||||||
revision = "6a74f9bdb90d9415b597064d815c9be38b401fee";
|
revision = "7560726734fc7267de2fa9abed2509968deefaa8";
|
||||||
name = "monodevelop-${version}";
|
name = "monodevelop-${version}";
|
||||||
|
|
||||||
srcs = [
|
src = fetchurl {
|
||||||
(fetchurl {
|
url = "http://download.mono-project.com/sources/monodevelop/${name}.tar.bz2";
|
||||||
url = "http://download.mono-project.com/sources/monodevelop/${name}.tar.bz2";
|
sha256 = "1bgqvlfi6pilj2zxsviqilh63qq98wsijqdiqwpkqchcw741zlyn";
|
||||||
sha256 = "0i9fpjkcys991dhxh02zf9imar3aj6fldk9ymy09vmr10f4d7vbf";
|
};
|
||||||
})
|
|
||||||
(fetchurl {
|
|
||||||
url = "https://launchpadlibrarian.net/153448659/NUnit-2.6.3.zip";
|
|
||||||
sha256 = "0vzbziq44zy7fyyhb44mf9ypfi7gvs17rxpg8c9d9lvvdpkshhcp";
|
|
||||||
})
|
|
||||||
(fetchurl {
|
|
||||||
url = "https://launchpadlibrarian.net/68057829/NUnit-2.5.10.11092.zip";
|
|
||||||
sha256 = "0k5h5bz1p2v3d0w0hpkpbpvdkcszgp8sr9ik498r1bs72w5qlwnc";
|
|
||||||
})
|
|
||||||
(fetchgit {
|
|
||||||
url = "https://github.com/mono/nuget-binary.git";
|
|
||||||
rev = "ecb27dd49384d70b6c861d28763906f2b25b7c8";
|
|
||||||
sha256 = "0dj0yglgwn07xw2crr66vl0vcgnr6m041pynyq0kdd0z8nlp92ki";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
sourceRoot = "monodevelop-5.7";
|
srcNugetBinary = fetchgit {
|
||||||
|
url = "https://github.com/mono/nuget-binary.git";
|
||||||
|
rev = "da1f2102f8172df6f7a1370a4998e3f88b91c047";
|
||||||
|
sha256 = "1hbnckc4gvqkknf8gh1k7iwqb4vdzifdjd19i60fnczly5v8m1c3";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNUnit = fetchurl {
|
||||||
|
url = "https://www.nuget.org/api/v2/package/NUnit/2.6.3";
|
||||||
|
sha256 = "0bb16i4ggwz32wkxsh485wf014cqqzhbyx0b3wbpmqjw7p4canph";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNUnitRunners = fetchurl {
|
||||||
|
url = "https://www.nuget.org/api/v2/package/NUnit.Runners/2.6.3";
|
||||||
|
sha256 = "0qwx1i9lxkp9pijj2bsczzgsamz651hngkxraqjap1v4m7d09a3b";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNUnit2510 = fetchurl {
|
||||||
|
url = "http://launchpad.net/nunitv2/2.5/2.5.10/+download/NUnit-2.5.10.11092.zip";
|
||||||
|
sha256 = "0k5h5bz1p2v3d0w0hpkpbpvdkcszgp8sr9ik498r1bs72w5qlwnc";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNugetSystemWebMvcExtensions = fetchurl {
|
||||||
|
url = https://www.nuget.org/api/v2/package/System.Web.Mvc.Extensions.Mvc.4/1.0.9;
|
||||||
|
sha256 = "19wi662m8primpimzifv8k560m6ymm73z0mf1r8ixl0xqag1hx6j";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNugetMicrosoftAspNetMvc = fetchurl {
|
||||||
|
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/5.2.2;
|
||||||
|
sha256 = "1jwfmz42kw2yb1g2hgp2h34fc4wx6s8z71da3mw5i4ivs25w9n2b";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNugetMicrosoftAspNetRazor = fetchurl {
|
||||||
|
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.Razor/3.2.2;
|
||||||
|
sha256 = "1db3apn4vzz1bx6q5fyv6nyx0drz095xgazqbw60qnhfs7z45axd";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNugetMicrosoftAspNetWebPages = fetchurl {
|
||||||
|
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.WebPages/3.2.2;
|
||||||
|
sha256 = "17fwb5yj165sql80i47zirjnm0gr4n8ypz408mz7p8a1n40r4i5l";
|
||||||
|
};
|
||||||
|
|
||||||
|
srcNugetMicrosoftWebInfrastructure = fetchurl {
|
||||||
|
url = https://www.nuget.org/api/v2/package/Microsoft.Web.Infrastructure/1.0.0.0;
|
||||||
|
sha256 = "1mxl9dri5729d0jl84gkpqifqf4xzb6aw1rzcfh6l0r24bix9afn";
|
||||||
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# From https://bugzilla.xamarin.com/show_bug.cgi?id=23696#c19
|
# From https://bugzilla.xamarin.com/show_bug.cgi?id=23696#c19
|
||||||
|
|
||||||
# it seems parts of MonoDevelop 5.2+ need NUnit 2.6.4, which isn't included
|
# it seems parts of MonoDevelop 5.2+ need NUnit 2.6.4, which isn't included
|
||||||
# (?), so download it and put it in the right place in the tree
|
# (?), so download it and put it in the right place in the tree
|
||||||
mkdir -v -p packages/NUnit.2.6.3/lib
|
mkdir packages
|
||||||
cp -vfR ../NUnit-2.6.3/bin/framework/* packages/NUnit.2.6.3/lib
|
unzip ${srcNUnit} -d packages/NUnit.2.6.3
|
||||||
mkdir -v -p packages/NUnit.Runners.2.6.3/tools/lib
|
unzip ${srcNUnitRunners} -d packages/NUnit.Runners.2.6.3
|
||||||
cp -vfR ../NUnit-2.6.3/bin/lib/* packages/NUnit.Runners.2.6.3/tools/lib
|
|
||||||
|
|
||||||
# cecil needs NUnit 2.5.10 - this is also missing from the tar
|
# cecil needs NUnit 2.5.10 - this is also missing from the tar
|
||||||
cp -vfR ../NUnit-2.5.10.11092/bin/net-2.0/framework/* external/cecil/Test/libs/nunit-2.5.10
|
unzip -j ${srcNUnit2510} -d external/cecil/Test/libs/nunit-2.5.10 NUnit-2.5.10.11092/bin/net-2.0/framework/\*
|
||||||
|
|
||||||
# the tar doesn't include the nuget binary, so grab it from github and copy it
|
# the tar doesn't include the nuget binary, so grab it from github and copy it
|
||||||
# into the right place
|
# into the right place
|
||||||
cp -vfR ../nuget-binary-*/* external/nuget-binary/
|
cp -vfR ${srcNugetBinary}/* external/nuget-binary/
|
||||||
'';
|
|
||||||
|
# AspNet plugin requires these packages
|
||||||
|
unzip ${srcNugetSystemWebMvcExtensions} -d packages/System.Web.Mvc.Extensions.Mvc.4.1.0.9
|
||||||
|
unzip ${srcNugetMicrosoftAspNetMvc} -d packages/Microsoft.AspNet.Mvc.5.2.2
|
||||||
|
unzip ${srcNugetMicrosoftAspNetRazor} -d packages/Microsoft.AspNet.Razor.3.2.2
|
||||||
|
unzip ${srcNugetMicrosoftAspNetWebPages} -d packages/Microsoft.AspNet.WebPages.3.2.2
|
||||||
|
unzip ${srcNugetMicrosoftWebInfrastructure} -d packages/Microsoft.Web.Infrastructure.1.0.0.0
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
autoconf automake pkgconfig shared_mime_info intltool
|
autoconf automake pkgconfig shared_mime_info intltool
|
||||||
@ -54,6 +89,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = "patchShebangs ./configure";
|
preConfigure = "patchShebangs ./configure";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
cat > ./buildinfo <<EOF
|
cat > ./buildinfo <<EOF
|
||||||
Release ID: ${version}
|
Release ID: ${version}
|
||||||
|
@ -17,9 +17,9 @@ stdenv.mkDerivation rec {
|
|||||||
# nvi tries to write to a usual tmp directory (/var/tmp),
|
# nvi tries to write to a usual tmp directory (/var/tmp),
|
||||||
# so we will force it to use /tmp.
|
# so we will force it to use /tmp.
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i -e s/-lcurses/-lncurses/ \
|
sed -i build/configure \
|
||||||
-e s@vi_cv_path_preserve=no@vi_cv_path_preserve=/tmp/vi.recover@ \
|
-e s@vi_cv_path_preserve=no@vi_cv_path_preserve=/tmp/vi.recover@ \
|
||||||
-e s@/var/tmp@@ build/configure
|
-e s@/var/tmp@@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
unzip cmake pkgconfig
|
unzip cmake pkgconfig
|
||||||
hunspell minizip boost xercesc qt5
|
hunspell minizip boost xercesc qt5.base qt5.tools qt5.webkit qt5.xmlpatterns
|
||||||
];
|
];
|
||||||
|
|
||||||
# XXX: the compiler seems to treat the .h file inappropriately:
|
# XXX: the compiler seems to treat the .h file inappropriately:
|
||||||
|
@ -2,20 +2,19 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "texmaker";
|
pname = "texmaker";
|
||||||
version = "4.1.1";
|
version = "4.4.1";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.xm1math.net/texmaker/${name}.tar.bz2";
|
url = "http://www.xm1math.net/texmaker/${name}.tar.bz2";
|
||||||
sha256 = "1h5rxdq6f05wk3lnlw96fxwrb14k77cx1mwy648127h2c8nsgw4z";
|
sha256 = "1d5lb4sibdhvzgfr0zi48j92b4acvvvdy2biqi3jzjdnzy9r94w0";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qt4 poppler_qt4 zlib ];
|
buildInputs = [ qt4 poppler_qt4 zlib ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig poppler ];
|
nativeBuildInputs = [ pkgconfig poppler ];
|
||||||
|
NIX_CFLAGS_COMPILE="-I${poppler}/include/poppler";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${poppler}/include/poppler/) " # for poppler-config.h
|
|
||||||
qmake PREFIX=$out DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps texmaker.pro
|
qmake PREFIX=$out DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps texmaker.pro
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
{ stdenv, fetchurl, qt4, poppler_qt4, zlib}:
|
{ stdenv, fetchurl, qt4, poppler_qt4, zlib, pkgconfig}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "texstudio";
|
pname = "texstudio";
|
||||||
version = "2.7.0";
|
version = "2.9.4";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
altname="Texstudio";
|
altname="Texstudio";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/texstudio/${name}.tar.gz";
|
url = "mirror://sourceforge/texstudio/${name}.tar.gz";
|
||||||
sha256 = "167d78nfk265jjvl129nr70v8ladb2rav2qyhw7ngr6m54gak831";
|
sha256 = "1smmc4xqs8x8qzp6iqj2wr4xarfnxxxp6rq6chx1kb256w75jwfw";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qt4 poppler_qt4 zlib ];
|
buildInputs = [ qt4 poppler_qt4 zlib pkgconfig];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${poppler_qt4}/include/poppler/qt4) "
|
qmake PREFIX=$out NO_APPDATA=True texstudio.pro
|
||||||
qmake PREFIX=$out texstudio.pro
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
|
||||||
|
|
||||||
{ cabal, binary, Cabal, cautiousFile, dataDefault, derive, dlist
|
|
||||||
, dynamicState, dyre, exceptions, filepath, glib, gtk, hashable
|
|
||||||
, hint, HUnit, lens, mtl, ooPrototypes, pango, parsec, pointedlist
|
|
||||||
, QuickCheck, random, regexBase, regexTdfa, safe, semigroups, split
|
|
||||||
, tagged, tasty, tastyHunit, tastyQuickcheck, text, time
|
|
||||||
, transformersBase, unixCompat, unorderedContainers, utf8String
|
|
||||||
, vty, wordTrie, xdgBasedir, yiLanguage, yiRope
|
|
||||||
}:
|
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
|
||||||
pname = "yi";
|
|
||||||
version = "0.11.1";
|
|
||||||
sha256 = "15m1wwrxmszl930az79lpgyz5rxg72gy8vi17ibpac1cszfdx192";
|
|
||||||
isLibrary = true;
|
|
||||||
isExecutable = true;
|
|
||||||
buildDepends = [
|
|
||||||
binary Cabal cautiousFile dataDefault derive dlist dynamicState
|
|
||||||
dyre exceptions filepath glib gtk hashable hint lens mtl
|
|
||||||
ooPrototypes pango parsec pointedlist QuickCheck random regexBase
|
|
||||||
regexTdfa safe semigroups split tagged text time transformersBase
|
|
||||||
unixCompat unorderedContainers utf8String vty wordTrie xdgBasedir
|
|
||||||
yiLanguage yiRope
|
|
||||||
];
|
|
||||||
testDepends = [
|
|
||||||
filepath HUnit lens QuickCheck semigroups tasty tastyHunit
|
|
||||||
tastyQuickcheck text yiLanguage yiRope
|
|
||||||
];
|
|
||||||
configureFlags = "-fpango -fvty";
|
|
||||||
noHaddock = self.stdenv.lib.versionOlder self.ghc.version "7.8";
|
|
||||||
meta = {
|
|
||||||
homepage = http://haskell.org/haskellwiki/Yi;
|
|
||||||
description = "The Haskell-Scriptable Editor";
|
|
||||||
license = self.stdenv.lib.licenses.gpl2;
|
|
||||||
platforms = self.ghc.meta.platforms;
|
|
||||||
maintainers = with self.stdenv.lib.maintainers; [ fuuzetsu ];
|
|
||||||
};
|
|
||||||
})
|
|
@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Zed is a fully offline-capable, open source, keyboard-focused, text and code editor for power users";
|
description = "A fully offline-capable, open source, keyboard-focused, text and code editor for power users";
|
||||||
license = stdenv.lib.licenses.mit;
|
license = stdenv.lib.licenses.mit;
|
||||||
homepage = http://zedapp.org/;
|
homepage = http://zedapp.org/;
|
||||||
maintainers = [ stdenv.lib.maintainers.matejc ];
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
pyqt4, qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper }:
|
pyqt4, qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "qgis-2.8.1";
|
name = "qgis-2.8.2";
|
||||||
|
|
||||||
buildInputs = [ gdal qt4 flex bison proj geos x11 sqlite gsl pyqt4 qwt qscintilla
|
buildInputs = [ gdal qt4 flex bison proj geos x11 sqlite gsl pyqt4 qwt qscintilla
|
||||||
fcgi libspatialindex libspatialite postgresql ] ++
|
fcgi libspatialindex libspatialite postgresql ] ++
|
||||||
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://qgis.org/downloads/${name}.tar.bz2";
|
url = "http://qgis.org/downloads/${name}.tar.bz2";
|
||||||
sha256 = "19acb74e4e2739238b87bf64f2750e10e366e9d61d070a4b8ca341ce01ca9741";
|
sha256 = "fd3c01e48224f611c3bb279b0af9cc1dff3844cdc93f7b45e4f37cf8f350bc4b";
|
||||||
};
|
};
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
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