Merge remote-tracking branch 'origin/master' into hardened-stdenv

This commit is contained in:
Franz Pletz 2016-08-24 11:01:53 +02:00
commit c0fa26ef3b
526 changed files with 10623 additions and 5211 deletions

View File

@ -659,4 +659,22 @@ src = fetchFromGitHub {
</itemizedlist> </itemizedlist>
</para> </para>
</section> </section>
<section xml:id="sec-patches"><title>Patches</title>
<para>Only patches that are unique to <literal>nixpkgs</literal> should be
included in <literal>nixpkgs</literal> source.</para>
<para>Patches available online should be retrieved using
<literal>fetchpatch</literal>.</para>
<para>
<programlisting>
patches = [
(fetchpatch {
name = "fix-check-for-using-shared-freetype-lib.patch";
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
sha256 = "1f0k043rng7f0rfl9hhb89qzvvksqmkrikmm38p61yfx51l325xr";
})
];
</programlisting>
</para>
</section>
</chapter> </chapter>

View File

@ -740,7 +740,7 @@ to the `stack.yaml` like the following:
enable: true enable: true
packages: [ zlib ] packages: [ zlib ]
Stack's Nix support knows to add `${zlib}/lib` and `${zlib}/include` as an Stack's Nix support knows to add `${zlib.out}/lib` and `${zlib.dev}/include` as an
`--extra-lib-dirs` and `extra-include-dirs`, respectively. Alternatively, you `--extra-lib-dirs` and `extra-include-dirs`, respectively. Alternatively, you
can achieve the same effect by hand. First of all, run can achieve the same effect by hand. First of all, run

View File

@ -291,8 +291,8 @@ pyfftw = buildPythonPackage rec {
# Tests cannot import pyfftw. pyfftw works fine though. # Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false; doCheck = false;
LDFLAGS="-L${pkgs.fftw}/lib -L${pkgs.fftwFloat}/lib -L${pkgs.fftwLongDouble}/lib" LDFLAGS="-L${pkgs.fftw.dev}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib"
CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include" CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include"
''; '';
meta = { meta = {
@ -503,9 +503,12 @@ and can be used as:
The `buildPythonPackage` mainly does four things: The `buildPythonPackage` mainly does four things:
* In the `buildPhase`, it calls `${python.interpreter} setup.py bdist_wheel` to build a wheel binary zipfile. * In the `buildPhase`, it calls `${python.interpreter} setup.py bdist_wheel` to
build a wheel binary zipfile.
* In the `installPhase`, it installs the wheel file using `pip install *.whl`. * In the `installPhase`, it installs the wheel file using `pip install *.whl`.
* In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to wrap all programs in the `$out/bin/*` directory to include `$PYTHONPATH` and `$PATH` environment variables. * In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to
wrap all programs in the `$out/bin/*` directory to include `$PATH`
environment variable and add dependent libraries to script's `sys.path`.
* In the `installCheck` phase, `${python.interpreter} setup.py test` is ran. * In the `installCheck` phase, `${python.interpreter} setup.py test` is ran.
As in Perl, dependencies on other Python packages can be specified in the As in Perl, dependencies on other Python packages can be specified in the

View File

@ -39,6 +39,7 @@
aristid = "Aristid Breitkreuz <aristidb@gmail.com>"; aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
arobyn = "Alexei Robyn <shados@shados.net>"; arobyn = "Alexei Robyn <shados@shados.net>";
artuuge = "Artur E. Ruuge <artuuge@gmail.com>"; artuuge = "Artur E. Ruuge <artuuge@gmail.com>";
ashalkhakov = "Artyom Shalkhakov <artyom.shalkhakov@gmail.com>";
asppsa = "Alastair Pharo <asppsa@gmail.com>"; asppsa = "Alastair Pharo <asppsa@gmail.com>";
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>"; astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
aszlig = "aszlig <aszlig@redmoonstudios.org>"; aszlig = "aszlig <aszlig@redmoonstudios.org>";
@ -99,6 +100,7 @@
davidak = "David Kleuker <post@davidak.de>"; davidak = "David Kleuker <post@davidak.de>";
davidrusu = "David Rusu <davidrusu.me@gmail.com>"; davidrusu = "David Rusu <davidrusu.me@gmail.com>";
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>"; dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
dbrock = "Daniel Brockman <daniel@brockman.se>";
deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>"; deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>";
demin-dmitriy = "Dmitriy Demin <demindf@gmail.com>"; demin-dmitriy = "Dmitriy Demin <demindf@gmail.com>";
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>"; DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
@ -127,7 +129,7 @@
ericbmerritt = "Eric Merritt <eric@afiniate.com>"; ericbmerritt = "Eric Merritt <eric@afiniate.com>";
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>"; ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>"; erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>";
ertes = "Ertugrul Söylemez <ertesx@gmx.de>"; ertes = "Ertugrul Söylemez <esz@posteo.de>";
exi = "Reno Reckling <nixos@reckling.org>"; exi = "Reno Reckling <nixos@reckling.org>";
exlevan = "Alexey Levan <exlevan@gmail.com>"; exlevan = "Alexey Levan <exlevan@gmail.com>";
expipiplus1 = "Joe Hermaszewski <nix@monoid.al>"; expipiplus1 = "Joe Hermaszewski <nix@monoid.al>";

View File

@ -98,4 +98,19 @@ rec {
*/ */
importJSON = path: importJSON = path:
builtins.fromJSON (builtins.readFile path); builtins.fromJSON (builtins.readFile path);
/* See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
to expand to Nix builtins that carry metadata so that Nix can filter out
the INFO messages without parsing the message string.
Usage:
{
foo = lib.warn "foo is deprecated" oldFoo;
}
TODO: figure out a clever way to integrate location information from
something like __unsafeGetAttrPos.
*/
warn = msg: builtins.trace "WARNING: ${msg}";
info = msg: builtins.trace "INFO: ${msg}";
} }

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
./maintainers/scripts/fetch-kde-qt.sh \ ./maintainers/scripts/fetch-kde-qt.sh \
http://download.kde.org/stable/applications/16.04.3/ -A '*.tar.xz' \ http://download.kde.org/stable/applications/16.08.0/ -A '*.tar.xz' \
>pkgs/desktops/kde-5/applications/srcs.nix >pkgs/desktops/kde-5/applications/srcs.nix

View File

@ -29,7 +29,7 @@
</group> </group>
<sbr /> <sbr />
<arg><option>--upgrade</option></arg> <arg><option>--upgrade</option></arg>
<arg><option>--install-grub</option></arg> <arg><option>--install-bootloader</option></arg>
<arg><option>--no-build-nix</option></arg> <arg><option>--no-build-nix</option></arg>
<arg><option>--fast</option></arg> <arg><option>--fast</option></arg>
<arg><option>--rollback</option></arg> <arg><option>--rollback</option></arg>
@ -212,12 +212,11 @@ $ ./result/bin/run-*-vm
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--install-grub</option></term> <term><option>--install-bootloader</option></term>
<listitem> <listitem>
<para>Causes the GRUB boot loader to be (re)installed on the <para>Causes the boot loader to be (re)installed on the
device specified by the device specified by the relevant configuration options.
<varname>boot.loader.grub.device</varname> configuration </para>
option.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -58,6 +58,14 @@ following incompatible changes:</para>
official documentation</link>.</para> official documentation</link>.</para>
</listitem> </listitem>
<listitem>
<para><literal>fonts.fontconfig.ultimate.rendering</literal> was removed
because our presets were obsolete for some time. New presets are hardcoded
into freetype; one selects a preset via <literal>fonts.fontconfig.ultimate.preset</literal>.
You can customize those presets via ordinary environment variables, using
<literal>environment.variables</literal>.</para>
</listitem>
</itemizedlist> </itemizedlist>

View File

@ -29,7 +29,7 @@ rec {
cp ${./test-driver/Logger.pm} $libDir/Logger.pm cp ${./test-driver/Logger.pm} $libDir/Logger.pm
wrapProgram $out/bin/nixos-test-driver \ wrapProgram $out/bin/nixos-test-driver \
--prefix PATH : "${qemu_kvm}/bin:${vde2}/bin:${netpbm}/bin:${coreutils}/bin" \ --prefix PATH : "${lib.makeBinPath [ qemu_kvm vde2 netpbm coreutils ]}" \
--prefix PERL5LIB : "${with perlPackages; lib.makePerlPath [ TermReadLineGnu XMLWriter IOTty FileSlurp ]}:$out/lib/perl5/site_perl" --prefix PERL5LIB : "${with perlPackages; lib.makePerlPath [ TermReadLineGnu XMLWriter IOTty FileSlurp ]}:$out/lib/perl5/site_perl"
''; '';
}; };

View File

@ -3,6 +3,95 @@
with lib; with lib;
let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>"; let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>";
cfg = config.fonts.fontconfig.ultimate;
latestVersion = pkgs.fontconfig.configVersion;
# fontconfig ultimate main configuration file
# priority 52
fontconfigUltimateConf = pkgs.writeText "fc-52-fontconfig-ultimate.conf" ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
${optionalString (!cfg.allowBitmaps) ''
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
''}
${optionalString cfg.allowType1 ''
<!-- Reject Type 1 fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="fontformat">
<string>Type 1</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
''}
<!-- Use embedded bitmaps in fonts like Calibri? -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
${fcBool cfg.useEmbeddedBitmaps}
</edit>
</match>
<!-- Force autohint always -->
<match target="font">
<edit name="force_autohint" mode="assign">
${fcBool cfg.forceAutohint}
</edit>
</match>
<!-- Render some monospace TTF fonts as bitmaps -->
<match target="pattern">
<edit name="bitmap_monospace" mode="assign">
${fcBool cfg.renderMonoTTFAsBitmap}
</edit>
</match>
</fontconfig>
'';
# The configuration to be included in /etc/font/
confPkg = pkgs.runCommand "font-ultimate-conf" {} ''
support_folder=$out/etc/fonts/conf.d
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
mkdir -p $support_folder
mkdir -p $latest_folder
# 52-fontconfig-ultimate.conf
ln -s ${fontconfigUltimateConf} \
$support_folder/52-fontconfig-ultimate.conf
ln -s ${fontconfigUltimateConf} \
$latest_folder/52-fontconfig-ultimate.conf
# fontconfig ultimate substitutions
${optionalString (cfg.substitutions != "none") ''
ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \
$support_folder
ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \
$latest_folder
''}
# fontconfig ultimate various configuration files
ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \
$support_folder
ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \
$latest_folder
'';
in in
{ {
@ -64,9 +153,7 @@ in
}; };
substitutions = mkOption { substitutions = mkOption {
type = types.str // { type = types.nullOr (types.enum ["free" "combi" "ms"]);
check = flip elem ["none" "free" "combi" "ms"];
};
default = "free"; default = "free";
description = '' description = ''
Font substitutions to replace common Type 1 fonts with nicer Font substitutions to replace common Type 1 fonts with nicer
@ -77,35 +164,12 @@ in
''; '';
}; };
rendering = mkOption { preset = mkOption {
type = types.attrs; type = types.enum ["ultimate1" "ultimate2" "ultimate3" "ultimate4" "ultimate5" "osx" "windowsxp"];
default = pkgs.fontconfig-ultimate.rendering.ultimate; default = "ultimate3";
description = '' description = ''
FreeType rendering settings presets. The default is FreeType rendering settings preset. Any of the presets may be
<literal>pkgs.fontconfig-ultimate.rendering.ultimate</literal>. customized by setting environment variables.
The other available styles are:
<literal>ultimate-lighter</literal>,
<literal>ultimate-darker</literal>,
<literal>ultimate-lightest</literal>,
<literal>ultimate-darkest</literal>,
<literal>default</literal> (the original Infinality default),
<literal>osx</literal>,
<literal>ipad</literal>,
<literal>ubuntu</literal>,
<literal>linux</literal>,
<literal>winxplight</literal>,
<literal>win7light</literal>,
<literal>winxp</literal>,
<literal>win7</literal>,
<literal>vanilla</literal>,
<literal>classic</literal>,
<literal>nudge</literal>,
<literal>push</literal>,
<literal>shove</literal>,
<literal>sharpened</literal>,
<literal>infinality</literal>. Any of the presets may be
customized by editing the attributes. To disable, set this option
to the empty attribute set <literal>{}</literal>.
''; '';
}; };
}; };
@ -114,79 +178,10 @@ in
}; };
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
config = fonts.fontconfig.confPackages = [ confPkg ];
let ultimate = config.fonts.fontconfig.ultimate; environment.variables."INFINALITY_FT" = cfg.preset;
fontconfigUltimateConf = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
${optionalString (!ultimate.allowBitmaps) ''
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
''}
${optionalString ultimate.allowType1 ''
<!-- Reject Type 1 fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="fontformat">
<string>Type 1</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
''}
<!-- Use embedded bitmaps in fonts like Calibri? -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
${fcBool ultimate.useEmbeddedBitmaps}
</edit>
</match>
<!-- Force autohint always -->
<match target="font">
<edit name="force_autohint" mode="assign">
${fcBool ultimate.forceAutohint}
</edit>
</match>
<!-- Render some monospace TTF fonts as bitmaps -->
<match target="pattern">
<edit name="bitmap_monospace" mode="assign">
${fcBool ultimate.renderMonoTTFAsBitmap}
</edit>
</match>
${optionalString (ultimate.substitutions != "none") ''
<!-- Type 1 font substitutions -->
<include ignore_missing="yes">${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${ultimate.substitutions}</include>
''}
<include ignore_missing="yes">${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d</include>
</fontconfig>
'';
in mkIf (config.fonts.fontconfig.enable && ultimate.enable) {
environment.etc."fonts/conf.d/52-fontconfig-ultimate.conf" = {
text = fontconfigUltimateConf;
};
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/52-fontconfig-ultimate.conf" = {
text = fontconfigUltimateConf;
};
environment.variables = ultimate.rendering;
}; };

View File

@ -1,7 +1,207 @@
/*
NixOS support 2 fontconfig versions, "support" and "latest".
- "latest" refers to default fontconfig package (pkgs.fontconfig).
configuration files are linked to /etc/fonts/VERSION/conf.d/
- "support" refers to supportPkg (pkgs."fontconfig_${supportVersion}").
configuration files are linked to /etc/fonts/conf.d/
This module generates a package containing configuration files and link it in /etc/fonts.
Fontconfig reads files in folder name / file name order, so the number prepended to the configuration file name decide the order of parsing.
Low number means high priority.
*/
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let cfg = config.fonts.fontconfig;
fcBool = x: "<bool>" + (if x then "true" else "false") + "</bool>";
# back-supported fontconfig version and package
# version is used for font cache generation
supportVersion = "210";
supportPkg = pkgs."fontconfig_${supportVersion}";
# latest fontconfig version and package
# version is used for configuration folder name, /etc/fonts/VERSION/
# note: format differs from supportVersion and can not be used with makeCacheConf
latestVersion = pkgs.fontconfig.configVersion;
latestPkg = pkgs.fontconfig;
# supported version fonts.conf
supportFontsConf = pkgs.makeFontsConf { fontconfig = supportPkg; fontDirectories = config.fonts.fonts; };
# configuration file to read fontconfig cache
# version dependent
# priority 0
cacheConfSupport = makeCacheConf { version = supportVersion; };
cacheConfLatest = makeCacheConf {};
# generate the font cache setting file for a fontconfig version
# use latest when no version is passed
makeCacheConf = { version ? null }:
let
fcPackage = if builtins.isNull version
then "fontconfig"
else "fontconfig_${version}";
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
cache = makeCache pkgs."${fcPackage}";
cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}";
in
pkgs.writeText "fc-00-nixos-cache.conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Font directories -->
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
<!-- Pre-generated font caches -->
<cachedir>${cache}</cachedir>
${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
<cachedir>${cache32}</cachedir>
''}
</fontconfig>
'';
# rendering settings configuration file
# priority 10
renderConf = pkgs.writeText "fc-10-nixos-rendering.conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default rendering settings -->
<match target="font">
<edit mode="assign" name="hinting">
${fcBool cfg.hinting.enable}
</edit>
<edit mode="assign" name="autohint">
${fcBool cfg.hinting.autohint}
</edit>
<edit mode="assign" name="hintstyle">
<const>hint${cfg.hinting.style}</const>
</edit>
<edit mode="assign" name="antialias">
${fcBool cfg.antialias}
</edit>
<edit mode="assign" name="rgba">
<const>${cfg.subpixel.rgba}</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcd${cfg.subpixel.lcdfilter}</const>
</edit>
</match>
${optionalString (cfg.dpi != 0) ''
<match target="pattern">
<edit name="dpi" mode="assign">
<double>${toString cfg.dpi}</double>
</edit>
</match>
''}
</fontconfig>
'';
# local configuration file
# priority 51
localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
# default fonts configuration file
# priority 52
defaultFontsConf =
let genDefault = fonts: name:
optionalString (fonts != []) ''
<alias>
<family>${name}</family>
<prefer>
${concatStringsSep ""
(map (font: ''
<family>${font}</family>
'') fonts)}
</prefer>
</alias>
'';
in
pkgs.writeText "fc-52-nixos-default-fonts.conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
${genDefault cfg.defaultFonts.sansSerif "sans-serif"}
${genDefault cfg.defaultFonts.serif "serif"}
${genDefault cfg.defaultFonts.monospace "monospace"}
</fontconfig>
'';
# fontconfig configuration package
confPkg = pkgs.runCommand "fontconfig-conf" {} ''
support_folder=$out/etc/fonts
latest_folder=$out/etc/fonts/${latestVersion}
mkdir -p $support_folder/conf.d
mkdir -p $latest_folder/conf.d
# fonts.conf
ln -s ${supportFontsConf} $support_folder/fonts.conf
ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
$latest_folder/fonts.conf
# fontconfig default config files
ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \
$support_folder/conf.d/
ln -s ${latestPkg.out}/etc/fonts/conf.d/*.conf \
$latest_folder/conf.d/
# update latest 51-local.conf path to look at the latest local.conf
rm $latest_folder/conf.d/51-local.conf
substitute ${latestPkg.out}/etc/fonts/conf.d/51-local.conf \
$latest_folder/conf.d/51-local.conf \
--replace local.conf /etc/fonts/${latestVersion}/local.conf
# 00-nixos-cache.conf
ln -s ${cacheConfSupport} \
$support_folder/conf.d/00-nixos-cache.conf
ln -s ${cacheConfLatest} $latest_folder/conf.d/00-nixos-cache.conf
# 10-nixos-rendering.conf
ln -s ${renderConf} $support_folder/conf.d/10-nixos-rendering.conf
ln -s ${renderConf} $latest_folder/conf.d/10-nixos-rendering.conf
# 50-user.conf
${optionalString (! cfg.includeUserConf) ''
rm $support_folder/conf.d/50-user.conf
rm $latest_folder/conf.d/50-user.conf
''}
# local.conf (indirect priority 51)
${optionalString (cfg.localConf != "") ''
ln -s ${localConf} $support_folder/local.conf
ln -s ${localConf} $latest_folder/local.conf
''}
# 52-nixos-default-fonts.conf
ln -s ${defaultFontsConf} $support_folder/conf.d/52-nixos-default-fonts.conf
ln -s ${defaultFontsConf} $latest_folder/conf.d/52-nixos-default-fonts.conf
'';
# Package with configuration files
# this merge all the packages in the fonts.fontconfig.confPackages list
fontconfigEtc = pkgs.buildEnv {
name = "fontconfig-etc";
paths = cfg.confPackages;
ignoreCollisions = true;
};
in
{ {
options = { options = {
@ -21,6 +221,15 @@ with lib;
''; '';
}; };
confPackages = mkOption {
internal = true;
type = with types; listOf path;
default = [ ];
description = ''
Fontconfig configuration packages.
'';
};
antialias = mkOption { antialias = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
@ -36,6 +245,15 @@ with lib;
''; '';
}; };
localConf = mkOption {
type = types.lines;
default = "";
description = ''
System-wide customization file contents, has higher priority than
<literal>defaultFonts</literal> settings.
'';
};
defaultFonts = { defaultFonts = {
monospace = mkOption { monospace = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
@ -142,136 +360,11 @@ with lib;
}; };
}; };
config = mkIf cfg.enable {
config = fonts.fontconfig.confPackages = [ confPkg ];
let fontconfig = config.fonts.fontconfig;
fcBool = x: "<bool>" + (if x then "true" else "false") + "</bool>";
renderConf = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default rendering settings -->
<match target="font">
<edit mode="assign" name="hinting">
${fcBool fontconfig.hinting.enable}
</edit>
<edit mode="assign" name="autohint">
${fcBool fontconfig.hinting.autohint}
</edit>
<edit mode="assign" name="hintstyle">
<const>hint${fontconfig.hinting.style}</const>
</edit>
<edit mode="assign" name="antialias">
${fcBool fontconfig.antialias}
</edit>
<edit mode="assign" name="rgba">
<const>${fontconfig.subpixel.rgba}</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcd${fontconfig.subpixel.lcdfilter}</const>
</edit>
</match>
${optionalString (fontconfig.dpi != 0) ''
<match target="pattern">
<edit name="dpi" mode="assign">
<double>${toString fontconfig.dpi}</double>
</edit>
</match>
''}
</fontconfig>
'';
genericAliasConf = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
${optionalString (fontconfig.defaultFonts.sansSerif != []) ''
<alias>
<family>sans-serif</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.sansSerif)}
</prefer>
</alias>
''}
${optionalString (fontconfig.defaultFonts.serif != []) ''
<alias>
<family>serif</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.serif)}
</prefer>
</alias>
''}
${optionalString (fontconfig.defaultFonts.monospace != []) ''
<alias>
<family>monospace</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.monospace)}
</prefer>
</alias>
''}
</fontconfig>
'';
in mkIf fontconfig.enable {
# Fontconfig 2.10 backward compatibility
# Bring in the default (upstream) fontconfig configuration, only for fontconfig 2.10
environment.etc."fonts/fonts.conf".source =
pkgs.makeFontsConf { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
environment.etc."fonts/conf.d/10-nixos-rendering.conf".text = renderConf;
environment.etc."fonts/conf.d/60-nixos-generic-alias.conf".text = genericAliasConf;
# Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig.
# Otherwise specify only font directories.
environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source =
"${pkgs.fontconfig.out}/etc/fonts/fonts.conf";
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
let
cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
in ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Font directories -->
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
<!-- Pre-generated font caches -->
<cachedir>${cache pkgs.fontconfig}</cachedir>
${optionalString (pkgs.stdenv.isx86_64 && config.fonts.fontconfig.cache32Bit) ''
<cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir>
''}
</fontconfig>
'';
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/10-nixos-rendering.conf".text = renderConf;
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/60-nixos-generic-alias.conf".text = genericAliasConf;
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/99-user.conf" = {
enable = fontconfig.includeUserConf;
text = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
</fontconfig>
'';
};
environment.systemPackages = [ pkgs.fontconfig ]; environment.systemPackages = [ pkgs.fontconfig ];
environment.etc.fonts.source = "${fontconfigEtc}/etc/fonts/";
}; };
} }

View File

@ -62,6 +62,18 @@ in
description = "Whether to enable authentication against an LDAP server."; description = "Whether to enable authentication against an LDAP server.";
}; };
loginPam = mkOption {
type = types.bool;
default = true;
description = "Whether to include authentication against LDAP in login PAM";
};
nsswitch = mkOption {
type = types.bool;
default = true;
description = "Whether to include lookup against LDAP in NSS";
};
server = mkOption { server = mkOption {
example = "ldap://ldap.example.org/"; example = "ldap://ldap.example.org/";
description = "The URL of the LDAP server."; description = "The URL of the LDAP server.";

View File

@ -8,7 +8,7 @@ let
inherit (config.services.avahi) nssmdns; inherit (config.services.avahi) nssmdns;
inherit (config.services.samba) nsswins; inherit (config.services.samba) nsswins;
ldap = config.users.ldap.enable; ldap = (config.users.ldap.enable && config.users.ldap.nsswitch);
in in

View File

@ -8,7 +8,7 @@ let
devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1)); devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1));
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; modprobe = "${pkgs.kmod}/bin/modprobe";
in in

View File

@ -0,0 +1,9 @@
{ config, lib, ... }:
with lib;
{
config = mkIf (elem "amdgpu" config.services.xserver.videoDrivers) {
boot.blacklistedKernelModules = [ "radeon" ];
};
}

View File

@ -75,7 +75,6 @@ in
serviceConfig = { serviceConfig = {
ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}"; ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
}; };
} }

View File

@ -36,7 +36,6 @@ in
# and load it back on resume # and load it back on resume
powerManagement.resumeCommands = '' powerManagement.resumeCommands = ''
export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
${pkgs.kmod}/bin/modprobe -v facetimehd ${pkgs.kmod}/bin/modprobe -v facetimehd
''; '';

View File

@ -260,7 +260,7 @@ touch $mountPoint/etc/NIXOS
# configuration. # configuration.
echo "finalising the installation..." echo "finalising the installation..."
if [ -z "$noBootLoader" ]; then if [ -z "$noBootLoader" ]; then
NIXOS_INSTALL_GRUB=1 chroot $mountPoint \ NIXOS_INSTALL_BOOTLOADER=1 chroot $mountPoint \
/nix/var/nix/profiles/system/bin/switch-to-configuration boot /nix/var/nix/profiles/system/bin/switch-to-configuration boot
fi fi

View File

@ -33,7 +33,11 @@ while [ "$#" -gt 0 ]; do
action="$i" action="$i"
;; ;;
--install-grub) --install-grub)
export NIXOS_INSTALL_GRUB=1 echo "$0: --install-grub deprecated, use --install-bootloader instead" >&2
export NIXOS_INSTALL_BOOTLOADER=1
;;
--install-bootloader)
export NIXOS_INSTALL_BOOTLOADER=1
;; ;;
--no-build-nix) --no-build-nix)
buildNix= buildNix=

View File

@ -37,9 +37,10 @@
./hardware/network/rtl8192c.nix ./hardware/network/rtl8192c.nix
./hardware/opengl.nix ./hardware/opengl.nix
./hardware/pcmcia.nix ./hardware/pcmcia.nix
./hardware/video/amdgpu.nix
./hardware/video/ati.nix
./hardware/video/bumblebee.nix ./hardware/video/bumblebee.nix
./hardware/video/nvidia.nix ./hardware/video/nvidia.nix
./hardware/video/ati.nix
./hardware/video/webcam/facetimehd.nix ./hardware/video/webcam/facetimehd.nix
./i18n/input-method/default.nix ./i18n/input-method/default.nix
./i18n/input-method/fcitx.nix ./i18n/input-method/fcitx.nix
@ -340,6 +341,7 @@
./services/networking/freenet.nix ./services/networking/freenet.nix
./services/networking/gale.nix ./services/networking/gale.nix
./services/networking/gateone.nix ./services/networking/gateone.nix
./services/networking/gdomap.nix
./services/networking/git-daemon.nix ./services/networking/git-daemon.nix
./services/networking/gnunet.nix ./services/networking/gnunet.nix
./services/networking/gogoclient.nix ./services/networking/gogoclient.nix

View File

@ -103,10 +103,9 @@ in
}; };
security.setuidPrograms = [ "su" "chfn" ] security.setuidPrograms = [ "su" "chfn" ]
++ [ "newuidmap" "newgidmap" ] # new in shadow 4.2.x
++ lib.optionals config.users.mutableUsers ++ lib.optionals config.users.mutableUsers
[ "passwd" "sg" "newgrp" [ "passwd" "sg" "newgrp" ];
"newuidmap" "newgidmap" # new in shadow 4.2.x
];
}; };

View File

@ -137,6 +137,9 @@ with lib;
# Unity3D # Unity3D
(mkRenamedOptionModule [ "programs" "unity3d" "enable" ] [ "security" "chromiumSuidSandbox" "enable" ]) (mkRenamedOptionModule [ "programs" "unity3d" "enable" ] [ "security" "chromiumSuidSandbox" "enable" ])
# fontconfig-ultimate
(mkRenamedOptionModule [ "fonts" "fontconfig" "ultimate" "rendering" ] [ "fonts" "fontconfig" "ultimate" "preset" ])
# Options that are obsolete and have no replacement. # Options that are obsolete and have no replacement.
(mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ]) (mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ])
(mkRemovedOptionModule [ "programs" "bash" "enable" ]) (mkRemovedOptionModule [ "programs" "bash" "enable" ])

View File

@ -221,7 +221,7 @@ let
('' (''
# Account management. # Account management.
account sufficient pam_unix.so account sufficient pam_unix.so
${optionalString config.users.ldap.enable ${optionalString use_ldap
"account sufficient ${pam_ldap}/lib/security/pam_ldap.so"} "account sufficient ${pam_ldap}/lib/security/pam_ldap.so"}
${optionalString config.krb5.enable ${optionalString config.krb5.enable
"account sufficient ${pam_krb5}/lib/security/pam_krb5.so"} "account sufficient ${pam_krb5}/lib/security/pam_krb5.so"}
@ -261,7 +261,7 @@ let
"auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"} "auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"}
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth ${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
"auth sufficient ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"} "auth sufficient ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"}
${optionalString config.users.ldap.enable ${optionalString use_ldap
"auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"} "auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"}
${optionalString config.krb5.enable '' ${optionalString config.krb5.enable ''
auth [default=ignore success=1 service_err=reset] ${pam_krb5}/lib/security/pam_krb5.so use_first_pass auth [default=ignore success=1 service_err=reset] ${pam_krb5}/lib/security/pam_krb5.so use_first_pass
@ -276,7 +276,7 @@ let
"password optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so"} "password optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so"}
${optionalString cfg.pamMount ${optionalString cfg.pamMount
"password optional ${pkgs.pam_mount}/lib/security/pam_mount.so"} "password optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
${optionalString config.users.ldap.enable ${optionalString use_ldap
"password sufficient ${pam_ldap}/lib/security/pam_ldap.so"} "password sufficient ${pam_ldap}/lib/security/pam_ldap.so"}
${optionalString config.krb5.enable ${optionalString config.krb5.enable
"password sufficient ${pam_krb5}/lib/security/pam_krb5.so use_first_pass"} "password sufficient ${pam_krb5}/lib/security/pam_krb5.so use_first_pass"}
@ -296,7 +296,7 @@ let
"session required ${pkgs.pam}/lib/security/pam_lastlog.so silent"} "session required ${pkgs.pam}/lib/security/pam_lastlog.so silent"}
${optionalString config.security.pam.enableEcryptfs ${optionalString config.security.pam.enableEcryptfs
"session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so"} "session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so"}
${optionalString config.users.ldap.enable ${optionalString use_ldap
"session optional ${pam_ldap}/lib/security/pam_ldap.so"} "session optional ${pam_ldap}/lib/security/pam_ldap.so"}
${optionalString config.krb5.enable ${optionalString config.krb5.enable
"session optional ${pam_krb5}/lib/security/pam_krb5.so"} "session optional ${pam_krb5}/lib/security/pam_krb5.so"}
@ -322,6 +322,7 @@ let
inherit (pkgs) pam_krb5 pam_ccreds; inherit (pkgs) pam_krb5 pam_ccreds;
use_ldap = (config.users.ldap.enable && config.users.ldap.loginPam);
pam_ldap = if config.users.ldap.daemon.enable then pkgs.nss_pam_ldapd else pkgs.pam_ldap; pam_ldap = if config.users.ldap.daemon.enable then pkgs.nss_pam_ldapd else pkgs.pam_ldap;
# Create a limits.conf(5) file. # Create a limits.conf(5) file.

View File

@ -77,15 +77,11 @@ in
preStart = '' preStart = ''
${pkgs.coreutils}/bin/mkdir -m 0700 -p /var/lib/buildkite-agent/.ssh ${pkgs.coreutils}/bin/mkdir -m 0700 -p /var/lib/buildkite-agent/.ssh
if ! [ -f /var/lib/buildkite-agent/.ssh/id_rsa ]; then
echo "${cfg.openssh.privateKey}" > /var/lib/buildkite-agent/.ssh/id_rsa echo "${cfg.openssh.privateKey}" > /var/lib/buildkite-agent/.ssh/id_rsa
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa ${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa
fi
if ! [ -f /var/lib/buildkite-agent/.ssh/id_rsa.pub ]; then
echo "${cfg.openssh.publicKey}" > /var/lib/buildkite-agent/.ssh/id_rsa.pub echo "${cfg.openssh.publicKey}" > /var/lib/buildkite-agent/.ssh/id_rsa.pub
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa.pub ${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa.pub
fi
''; '';
serviceConfig = serviceConfig =

View File

@ -166,7 +166,7 @@ in
buildMachinesFiles = mkOption { buildMachinesFiles = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [ "/etc/nix/machines" ];
example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ]; example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ];
description = "List of files containing build machines."; description = "List of files containing build machines.";
}; };
@ -193,7 +193,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.extraGroups.hydra = { }; users.extraGroups.hydra = {
gid = config.ids.gids.hydra;
};
users.extraUsers.hydra = users.extraUsers.hydra =
{ description = "Hydra"; { description = "Hydra";
@ -201,6 +203,7 @@ in
createHome = true; createHome = true;
home = baseDir; home = baseDir;
useDefaultShell = true; useDefaultShell = true;
uid = config.ids.uids.hydra;
}; };
users.extraUsers.hydra-queue-runner = users.extraUsers.hydra-queue-runner =
@ -208,12 +211,14 @@ in
group = "hydra"; group = "hydra";
useDefaultShell = true; useDefaultShell = true;
home = "${baseDir}/queue-runner"; # really only to keep SSH happy home = "${baseDir}/queue-runner"; # really only to keep SSH happy
uid = config.ids.uids.hydra-queue-runner;
}; };
users.extraUsers.hydra-www = users.extraUsers.hydra-www =
{ description = "Hydra web server"; { description = "Hydra web server";
group = "hydra"; group = "hydra";
useDefaultShell = true; useDefaultShell = true;
uid = config.ids.uids.hydra-www;
}; };
nix.trustedUsers = [ "hydra-queue-runner" ]; nix.trustedUsers = [ "hydra-queue-runner" ];

View File

@ -72,8 +72,6 @@ in
ExecStart = "${tlp}/bin/tlp init start"; ExecStart = "${tlp}/bin/tlp init start";
ExecStop = "${tlp}/bin/tlp init stop"; ExecStop = "${tlp}/bin/tlp init stop";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
tlp-sleep = { tlp-sleep = {
@ -92,8 +90,6 @@ in
ExecStart = "${tlp}/bin/tlp suspend"; ExecStart = "${tlp}/bin/tlp suspend";
ExecStop = "${tlp}/bin/tlp resume"; ExecStop = "${tlp}/bin/tlp resume";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
}; };

View File

@ -58,7 +58,7 @@ let
# Fix some paths in the standard udev rules. Hacky. # Fix some paths in the standard udev rules. Hacky.
for i in $out/*.rules; do for i in $out/*.rules; do
substituteInPlace $i \ substituteInPlace $i \
--replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/modprobe \ --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \
--replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \ --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \
--replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \ --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \
--replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \ --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \
@ -316,8 +316,7 @@ in
''; '';
systemd.services.systemd-udevd = systemd.services.systemd-udevd =
{ environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; { restartTriggers = cfg.packages;
restartTriggers = cfg.packages;
}; };
}; };

View File

@ -121,7 +121,7 @@ let
makeWrapper ${cfg.packages.gitlab.env}/bin/bundle $out/bin/gitlab-bundle \ makeWrapper ${cfg.packages.gitlab.env}/bin/bundle $out/bin/gitlab-bundle \
${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \ ${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \
--set GITLAB_CONFIG_PATH '${cfg.statePath}/config' \ --set GITLAB_CONFIG_PATH '${cfg.statePath}/config' \
--set PATH '${pkgs.nodejs}/bin:${pkgs.gzip}/bin:${config.services.postgresql.package}/bin:$PATH' \ --set PATH '${stdenv.lib.makeBinPath [ pkgs.nodejs pkgs.gzip config.services.postgresql.package ]}:$PATH' \
--set RAKEOPT '-f ${cfg.packages.gitlab}/share/gitlab/Rakefile' \ --set RAKEOPT '-f ${cfg.packages.gitlab}/share/gitlab/Rakefile' \
--run 'cd ${cfg.packages.gitlab}/share/gitlab' --run 'cd ${cfg.packages.gitlab}/share/gitlab'
makeWrapper $out/bin/gitlab-bundle $out/bin/gitlab-rake \ makeWrapper $out/bin/gitlab-bundle $out/bin/gitlab-rake \

View File

@ -248,7 +248,7 @@ in
description = '' description = ''
List of binary cache URLs that non-root users can use (in List of binary cache URLs that non-root users can use (in
addition to those specified using addition to those specified using
<option>nix.binaryCaches</option> by passing <option>nix.binaryCaches</option>) by passing
<literal>--option binary-caches</literal> to Nix commands. <literal>--option binary-caches</literal> to Nix commands.
''; '';
}; };

View File

@ -390,7 +390,7 @@ in {
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; environment = carbonEnv;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}"; ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
User = "graphite"; User = "graphite";
Group = "graphite"; Group = "graphite";
PermissionsStartOnly = true; PermissionsStartOnly = true;
@ -413,7 +413,7 @@ in {
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; environment = carbonEnv;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}"; ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
User = "graphite"; User = "graphite";
Group = "graphite"; Group = "graphite";
PIDFile="/run/${name}/${name}.pid"; PIDFile="/run/${name}/${name}.pid";
@ -429,7 +429,7 @@ in {
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; environment = carbonEnv;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}"; ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
User = "graphite"; User = "graphite";
Group = "graphite"; Group = "graphite";
PIDFile="/run/${name}/${name}.pid"; PIDFile="/run/${name}/${name}.pid";
@ -461,11 +461,11 @@ in {
penvPack = "${penv}/${pkgs.python.sitePackages}"; penvPack = "${penv}/${pkgs.python.sitePackages}";
# opt/graphite/webapp contains graphite/settings.py # opt/graphite/webapp contains graphite/settings.py
# explicitly adding pycairo in path because it cannot be imported via buildEnv # explicitly adding pycairo in path because it cannot be imported via buildEnv
in "${penvPack}/opt/graphite/webapp:${penvPack}:${pkgs.pycairo}/${pkgs.python.sitePackages}"; in "${penvPack}/opt/graphite/webapp:${penvPack}:${pkgs.pythonPackages.pycairo}/${pkgs.python.sitePackages}";
DJANGO_SETTINGS_MODULE = "graphite.settings"; DJANGO_SETTINGS_MODULE = "graphite.settings";
GRAPHITE_CONF_DIR = configDir; GRAPHITE_CONF_DIR = configDir;
GRAPHITE_STORAGE_DIR = dataDir; GRAPHITE_STORAGE_DIR = dataDir;
LD_LIBRARY_PATH = "${pkgs.cairo}/lib"; LD_LIBRARY_PATH = "${pkgs.cairo.out}/lib";
}; };
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''

View File

@ -80,7 +80,7 @@ in
preStart = '' preStart = ''
mkdir -p -m 0755 /afs mkdir -p -m 0755 /afs
mkdir -m 0700 -p ${cfg.cacheDirectory} mkdir -m 0700 -p ${cfg.cacheDirectory}
${pkgs.kmod}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true ${pkgs.kmod}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"} ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
''; '';

View File

@ -5,7 +5,7 @@ with lib;
let let
cfg = config.networking.fan; cfg = config.networking.fan;
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; modprobe = "${pkgs.kmod}/bin/modprobe";
in in

View File

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.gdomap;
in
{
#
# interface
#
options = {
services.gdomap = {
enable = mkEnableOption "GNUstep Distributed Objects name server";
};
};
#
# implementation
#
config = mkIf config.services.gdomap.enable {
# NOTE: gdomap runs as root
# TODO: extra user for gdomap?
systemd.services.gdomap = {
description = "gdomap server";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
path = [ pkgs.gnustep.base ];
serviceConfig.ExecStart = "${pkgs.gnustep.base}/bin/gdomap -f";
};
};
}

View File

@ -118,7 +118,7 @@ in
systemd.services.strongswan = { systemd.services.strongswan = {
description = "strongSwan IPSec Service"; description = "strongSwan IPSec Service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = with pkgs; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
wants = [ "keys.target" ]; wants = [ "keys.target" ];
after = [ "network.target" "keys.target" ]; after = [ "network.target" "keys.target" ];
environment = { environment = {

View File

@ -133,7 +133,7 @@ in
@{PROC}/sys/kernel/random/uuid r, @{PROC}/sys/kernel/random/uuid r,
@{PROC}/sys/vm/overcommit_memory r, @{PROC}/sys/vm/overcommit_memory r,
${pkgs.openssl}/etc/** r, ${pkgs.openssl.out}/etc/** r,
${pkgs.transmission}/share/transmission/** r, ${pkgs.transmission}/share/transmission/** r,
owner ${settingsDir}/** rw, owner ${settingsDir}/** rw,

View File

@ -37,7 +37,7 @@ in
type = types.str; type = types.str;
example = "https://chat.example.com"; example = "https://chat.example.com";
description = '' description = ''
URL this Mattermost instance is reachable under, without trailing slash." URL this Mattermost instance is reachable under, without trailing slash.
''; '';
}; };

View File

@ -169,7 +169,7 @@ in
++ lib.optional config.networking.networkmanager.enable kde5.plasma-nm ++ lib.optional config.networking.networkmanager.enable kde5.plasma-nm
++ lib.optional config.hardware.pulseaudio.enable kde5.plasma-pa ++ lib.optional config.hardware.pulseaudio.enable kde5.plasma-pa
++ lib.optional config.powerManagement.enable kde5.powerdevil ++ lib.optional config.powerManagement.enable kde5.powerdevil
++ lib.optional config.services.colord.enable kde5.colord-kde ++ lib.optional config.services.colord.enable pkgs.colord-kde
++ lib.optionals config.services.samba.enable [ kde5.kdenetwork-filesharing pkgs.samba ]; ++ lib.optionals config.services.samba.enable [ kde5.kdenetwork-filesharing pkgs.samba ];
environment.pathsToLink = [ "/share" ]; environment.pathsToLink = [ "/share" ];

View File

@ -134,8 +134,9 @@ let
(*) echo "$0: Desktop manager '$desktopManager' not found.";; (*) echo "$0: Desktop manager '$desktopManager' not found.";;
esac esac
# FIXME: gdbus should not be in glib.dev!
${optionalString (cfg.startDbusSession && cfg.updateDbusEnvironment) '' ${optionalString (cfg.startDbusSession && cfg.updateDbusEnvironment) ''
${pkgs.glib}/bin/gdbus call --session \ ${pkgs.glib.dev}/bin/gdbus call --session \
--dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \ --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \
--method org.freedesktop.DBus.UpdateActivationEnvironment \ --method org.freedesktop.DBus.UpdateActivationEnvironment \
"{$(env | ${pkgs.gnused}/bin/sed "s/'/\\\\'/g; s/\([^=]*\)=\(.*\)/'\1':'\2'/" \ "{$(env | ${pkgs.gnused}/bin/sed "s/'/\\\\'/g; s/\([^=]*\)=\(.*\)/'\1':'\2'/" \

View File

@ -20,9 +20,9 @@ in
services.xserver.windowManager.session = singleton services.xserver.windowManager.session = singleton
{ name = "metacity"; { name = "metacity";
start = '' start = ''
env LD_LIBRARY_PATH=${xorg.libX11.out}/lib:${xorg.libXext.out}/lib:/usr/lib/ env LD_LIBRARY_PATH=${lib.makeLibraryPath [ xorg.libX11 xorg.libXext ]}:/usr/lib/
# !!! Hack: load the schemas for Metacity. # !!! Hack: load the schemas for Metacity.
GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf}/bin/gconftool-2 \ GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf.out}/bin/gconftool-2 \
--makefile-install-rule ${gnome.metacity}/etc/gconf/schemas/*.schemas # */ --makefile-install-rule ${gnome.metacity}/etc/gconf/schemas/*.schemas # */
${gnome.metacity}/bin/metacity & ${gnome.metacity}/bin/metacity &
waitPID=$! waitPID=$!

View File

@ -93,6 +93,10 @@ in
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib
${optionalString (cfg.hostRSAKey != null) "install -D ${cfg.hostRSAKey} $out/etc/dropbear/dropbear_rsa_host_key"}
${optionalString (cfg.hostDSSKey != null) "install -D ${cfg.hostDSSKey} $out/etc/dropbear/dropbear_dss_host_key"}
${optionalString (cfg.hostECDSAKey != null) "install -D ${cfg.hostECDSAKey} $out/etc/dropbear/dropbear_ecdsa_host_key"}
''; '';
boot.initrd.extraUtilsCommandsTest = '' boot.initrd.extraUtilsCommandsTest = ''
@ -108,9 +112,9 @@ in
touch /var/log/lastlog touch /var/log/lastlog
mkdir -p /etc/dropbear mkdir -p /etc/dropbear
${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"} ${optionalString (cfg.hostRSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key"}
${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"} ${optionalString (cfg.hostDSSKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_dss_host_key /etc/dropbear/dropbear_dss_host_key"}
${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"} ${optionalString (cfg.hostECDSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_ecdsa_host_key /etc/dropbear/dropbear_ecdsa_host_key"}
mkdir -p /root/.ssh mkdir -p /root/.ssh
${concatStrings (map (key: '' ${concatStrings (map (key: ''

View File

@ -228,7 +228,6 @@ in
systemd.services."systemd-modules-load" = systemd.services."systemd-modules-load" =
{ wantedBy = [ "multi-user.target" ]; { wantedBy = [ "multi-user.target" ];
restartTriggers = [ kernelModulesConf ]; restartTriggers = [ kernelModulesConf ];
environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
serviceConfig = serviceConfig =
{ # Ignore failed module loads. Typically some of the { # Ignore failed module loads. Typically some of the
# modules in boot.kernelModules are "nice to have but # modules in boot.kernelModules are "nice to have but
@ -238,10 +237,6 @@ in
}; };
}; };
systemd.services.kmod-static-nodes =
{ environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
};
lib.kernelConfig = { lib.kernelConfig = {
isYes = option: { isYes = option: {
assertion = config: config.isYes option; assertion = config: config.isYes option;

View File

@ -508,7 +508,11 @@ my $nameDiffer = get("fullName") ne $prevGrubState->name;
my $versionDiffer = get("fullVersion") ne $prevGrubState->version; my $versionDiffer = get("fullVersion") ne $prevGrubState->version;
my $efiDiffer = $efiTarget ne $prevGrubState->efi; my $efiDiffer = $efiTarget ne $prevGrubState->efi;
my $efiMountPointDiffer = $efiSysMountPoint ne $prevGrubState->efiMountPoint; my $efiMountPointDiffer = $efiSysMountPoint ne $prevGrubState->efiMountPoint;
my $requireNewInstall = $devicesDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1"); if (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1") {
warn "NIXOS_INSTALL_GRUB env var deprecated, use NIXOS_INSTALL_BOOTLOADER";
$ENV{'NIXOS_INSTALL_BOOTLOADER'} = "1";
}
my $requireNewInstall = $devicesDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_BOOTLOADER'} // "") eq "1");
# install a symlink so that grub can detect the boot drive # install a symlink so that grub can detect the boot drive
my $tmpDir = File::Temp::tempdir(CLEANUP => 1) or die "Failed to create temporary space"; my $tmpDir = File::Temp::tempdir(CLEANUP => 1) or die "Failed to create temporary space";

View File

@ -7,6 +7,7 @@ import subprocess
import glob import glob
import tempfile import tempfile
import errno import errno
import warnings
def copy_if_not_exists(source, dest): def copy_if_not_exists(source, dest):
if not os.path.exists(dest): if not os.path.exists(dest):
@ -92,8 +93,11 @@ parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot
parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot')
args = parser.parse_args() args = parser.parse_args()
# We deserve our own env var!
if os.getenv("NIXOS_INSTALL_GRUB") == "1": if os.getenv("NIXOS_INSTALL_GRUB") == "1":
warnings.warn("NIXOS_INSTALL_GRUB env var deprecated, use NIXOS_INSTALL_BOOTLOADER", DeprecationWarning)
os.environ["NIXOS_INSTALL_BOOTLOADER"] = "1"
if os.getenv("NIXOS_INSTALL_BOOTLOADER") == "1":
if "@canTouchEfiVariables@" == "1": if "@canTouchEfiVariables@" == "1":
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"]) subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"])
else: else:

View File

@ -8,41 +8,6 @@ with lib;
options = { options = {
system.sbin.modprobe = mkOption {
internal = true;
default = pkgs.stdenv.mkDerivation {
name = "modprobe";
buildCommand = ''
mkdir -p $out/bin
for i in ${pkgs.kmod}/sbin/*; do
name=$(basename $i)
echo "$text" > $out/bin/$name
echo 'exec '$i' "$@"' >> $out/bin/$name
chmod +x $out/bin/$name
done
ln -s bin $out/sbin
'';
text =
''
#! ${pkgs.stdenv.shell}
export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
# Fall back to the kernel modules used at boot time if the
# modules in the current configuration don't match the
# running kernel.
if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then
MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/
fi
'';
meta.priority = 4;
};
description = ''
Wrapper around modprobe that sets the path to the modules
tree.
'';
};
boot.blacklistedKernelModules = mkOption { boot.blacklistedKernelModules = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
@ -87,7 +52,7 @@ with lib;
''; '';
environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; environment.systemPackages = [ pkgs.kmod ];
system.activationScripts.modprobe = system.activationScripts.modprobe =
'' ''
@ -95,11 +60,9 @@ with lib;
# in the right location in the Nix store for kernel modules). # in the right location in the Nix store for kernel modules).
# We need this when the kernel (or some module) auto-loads a # We need this when the kernel (or some module) auto-loads a
# module. # module.
echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe
''; '';
environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
}; };
} }

View File

@ -312,8 +312,50 @@ mountFS() {
echo "retrying..." echo "retrying..."
n=$((n + 1)) n=$((n + 1))
done done
[ "$mountPoint" == "/" ] &&
[ -f "/mnt-root/etc/NIXOS_LUSTRATE" ] &&
lustrateRoot "/mnt-root"
} }
lustrateRoot () {
local root="$1"
echo
echo -e "\e[1;33m<<< NixOS is now lustrating the root filesystem (cruft goes to /old-root) >>>\e[0m"
echo
mkdir -m 0755 -p "$root/old-root.tmp"
echo
echo "Moving impurities out of the way:"
for d in "$root"/*
do
[ "$d" == "$root/nix" ] && continue
[ "$d" == "$root/boot" ] && continue # Don't render the system unbootable
[ "$d" == "$root/old-root.tmp" ] && continue
mv -v "$d" "$root/old-root.tmp"
done
# Use .tmp to make sure subsequent invokations don't clash
mv -v "$root/old-root.tmp" "$root/old-root"
mkdir -m 0755 -p "$root/etc"
touch "$root/etc/NIXOS"
exec 4< "$root/old-root/etc/NIXOS_LUSTRATE"
echo
echo "Restoring selected impurities:"
while read -u 4 keeper; do
dirname="$(dirname "$keeper")"
mkdir -m 0755 -p "$root/$dirname"
cp -av "$root/old-root/$keeper" "$root/$keeper"
done
exec 4>&-
}
# Function for waiting a device to appear. # Function for waiting a device to appear.
waitDevice() { waitDevice() {

View File

@ -131,9 +131,16 @@ let
# The initrd only has to mount / or any FS marked as necessary for # The initrd only has to mount / or any FS marked as necessary for
# booting (such as the FS containing /nix/store, or an FS needed for # booting (such as the FS containing /nix/store, or an FS needed for
# mounting /, like / on a loopback). # mounting /, like / on a loopback).
fileSystems = filter #
(fs: fs.neededForBoot || elem fs.mountPoint [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ]) # We need to guarantee that / is the first filesystem in the list so
(attrValues config.fileSystems); # that if and when lustrateRoot is invoked, nothing else is mounted
fileSystems = let
filterNeeded = filter
(fs: fs.mountPoint != "/" && (fs.neededForBoot || elem fs.mountPoint [ "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ]));
filterRoot = filter
(fs: fs.mountPoint == "/");
allFileSystems = attrValues config.fileSystems;
in (filterRoot allFileSystems) ++ (filterNeeded allFileSystems);
udevRules = pkgs.stdenv.mkDerivation { udevRules = pkgs.stdenv.mkDerivation {

View File

@ -207,6 +207,5 @@ exec {logOutFd}>&- {logErrFd}>&-
# Start systemd. # Start systemd.
echo "starting systemd..." echo "starting systemd..."
PATH=/run/current-system/systemd/lib/systemd \ PATH=/run/current-system/systemd/lib/systemd \
MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \
LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
exec systemd exec systemd

View File

@ -38,7 +38,7 @@ in
description = "CPU Frequency Governor Setup"; description = "CPU Frequency Governor Setup";
after = [ "systemd-modules-load.service" ]; after = [ "systemd-modules-load.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ cpupower config.system.sbin.modprobe ]; path = [ cpupower pkgs.kmod ];
unitConfig.ConditionVirtualization = false; unitConfig.ConditionVirtualization = false;
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";

View File

@ -11,14 +11,14 @@ in
{ {
config = { config = {
system.fsPackages = mkIf (any (fs: fs == "cifs") config.boot.supportedFilesystems) [ pkgs.cifs_utils ]; system.fsPackages = mkIf (any (fs: fs == "cifs") config.boot.supportedFilesystems) [ pkgs.cifs-utils ];
boot.initrd.availableKernelModules = mkIf inInitrd boot.initrd.availableKernelModules = mkIf inInitrd
[ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ]; [ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ];
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
copy_bin_and_libs ${pkgs.cifs_utils}/sbin/mount.cifs copy_bin_and_libs ${pkgs.cifs-utils}/sbin/mount.cifs
''; '';
}; };

View File

@ -247,8 +247,18 @@ in
esac esac
done done
''] ++ (map (pool: '' ''] ++ (map (pool: ''
echo "importing root ZFS pool \"${pool}\"..." echo -n "importing root ZFS pool \"${pool}\"..."
zpool import -d ${cfgZfs.devNodes} -N $ZFS_FORCE "${pool}" trial=0
until msg="$(zpool import -d ${cfgZfs.devNodes} -N $ZFS_FORCE '${pool}' 2>&1)"; do
sleep 0.25
echo -n .
trial=$(($trial + 1))
if [[ $trial -eq 60 ]]; then
break
fi
done
echo
if [[ -n "$msg" ]]; then echo "$msg"; fi
'') rootPools)); '') rootPools));
}; };

View File

@ -20,7 +20,7 @@ in
postVM = postVM =
'' ''
PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin PATH=$PATH:${stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out pushd $out
${pkgs.qemu_kvm}/bin/qemu-img convert -c -O qcow2 $diskImageBase nixos.qcow2 ${pkgs.qemu_kvm}/bin/qemu-img convert -c -O qcow2 $diskImageBase nixos.qcow2
rm $diskImageBase rm $diskImageBase

View File

@ -95,8 +95,7 @@ in
LimitNPROC = 1048576; LimitNPROC = 1048576;
} // proxy_env; } // proxy_env;
path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
postStart = if cfg.socketActivation then "" else cfg.postStart; postStart = if cfg.socketActivation then "" else cfg.postStart;

View File

@ -23,7 +23,7 @@ in
postVM = postVM =
'' ''
PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin PATH=$PATH:${stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out pushd $out
mv $diskImageBase disk.raw mv $diskImageBase disk.raw
tar -Szcf $diskImageBase.tar.gz disk.raw tar -Szcf $diskImageBase.tar.gz disk.raw

View File

@ -135,13 +135,13 @@ let
} }
'' ''
# Create a /boot EFI partition with 40M # Create a /boot EFI partition with 40M
${pkgs.gptfdisk}/sbin/sgdisk -G /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -A 1:set:1 /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -A 2:set:2 /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -h 2 /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda
${pkgs.gptfdisk}/sbin/sgdisk -C /dev/vda ${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda
${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2 ${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
. /sys/class/block/vda2/uevent . /sys/class/block/vda2/uevent
mknod /dev/vda2 b $MAJOR $MINOR mknod /dev/vda2 b $MAJOR $MINOR
@ -151,11 +151,11 @@ let
${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot ${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot
# Mount /boot; load necessary modules first. # Mount /boot; load necessary modules first.
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
mkdir /boot mkdir /boot
mount /dev/vda2 /boot mount /dev/vda2 /boot
@ -370,7 +370,7 @@ in
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =
'' ''
# We need mke2fs in the initrd. # We need mke2fs in the initrd.
copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs
''; '';
boot.initrd.postDeviceCommands = boot.initrd.postDeviceCommands =

View File

@ -68,6 +68,7 @@ in rec {
(all nixos.tests.boot.uefiCdrom) (all nixos.tests.boot.uefiCdrom)
(all nixos.tests.boot.uefiUsb) (all nixos.tests.boot.uefiUsb)
(all nixos.tests.boot-stage1) (all nixos.tests.boot-stage1)
(all nixos.tests.hibernate)
(all nixos.tests.ecryptfs) (all nixos.tests.ecryptfs)
(all nixos.tests.ipv6) (all nixos.tests.ipv6)
(all nixos.tests.i3wm) (all nixos.tests.i3wm)

View File

@ -4,12 +4,12 @@ with import ../lib/testing.nix { inherit system; };
with pkgs.lib; with pkgs.lib;
let let
testVMConfig = vmName: attrs: { config, pkgs, ... }: let testVMConfig = vmName: attrs: { config, pkgs, lib, ... }: let
guestAdditions = pkgs.linuxPackages.virtualboxGuestAdditions; guestAdditions = pkgs.linuxPackages.virtualboxGuestAdditions;
miniInit = '' miniInit = ''
#!${pkgs.stdenv.shell} -xe #!${pkgs.stdenv.shell} -xe
export PATH="${pkgs.coreutils}/bin:${pkgs.utillinux}/bin" export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.utillinux ]}"
mkdir -p /var/run/dbus mkdir -p /var/run/dbus
cat > /etc/passwd <<EOF cat > /etc/passwd <<EOF

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
postFixup = '' postFixup = ''
for executable in $(cd $out/bin && ls); do for executable in $(cd $out/bin && ls); do
wrapProgram $out/bin/$executable \ wrapProgram $out/bin/$executable \
--prefix PATH : "${bc}/bin:${findutils}/bin:${sox}/bin:${procps}/bin:${opusTools}/bin:${lame}/bin:${flac.bin}/bin" --prefix PATH : "${stdenv.lib.makeBinPath [ bc findutils sox procps opusTools lame flac ]}"
done done
''; '';

View File

@ -1,6 +1,6 @@
{ stdenv, fetchsvn, pkgconfig, autoreconfHook, gnutls33, freetype { stdenv, fetchsvn, pkgconfig, autoreconfHook, gnutls33, freetype
, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, libjack2, libvorbis , SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, libjack2, libvorbis
, libsndfile, libogg , libSM, libsndfile, libogg
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ buildInputs = [
pkgconfig autoreconfHook gnutls33 freetype SDL SDL_gfx SDL_ttf pkgconfig autoreconfHook gnutls33 freetype SDL SDL_gfx SDL_ttf
liblo libxml2 libjack2 alsaLib libvorbis libsndfile libogg liblo libxml2 libjack2 alsaLib libvorbis libsndfile libogg libSM
]; ];
patches = [ ./am_path_sdl.patch ./xml.patch ]; patches = [ ./am_path_sdl.patch ./xml.patch ];

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, libtool, intltool, pkgconfig, glib { stdenv, fetchurl, libtool, intltool, pkgconfig, glib
, gtk, curl, mpd_clientlib, libsoup, gob2, vala, libunique , gtk, curl, mpd_clientlib, libsoup, gob2, vala_0_23, libunique
, libSM, libICE, sqlite, hicolor_icon_theme, wrapGAppsHook , libSM, libICE, sqlite, hicolor_icon_theme, wrapGAppsHook
}: }:
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
libtool intltool pkgconfig glib gtk curl mpd_clientlib libsoup libtool intltool pkgconfig glib gtk curl mpd_clientlib libsoup
libunique libmpd gob2 vala libSM libICE sqlite hicolor_icon_theme libunique libmpd gob2 vala_0_23 libSM libICE sqlite hicolor_icon_theme
wrapGAppsHook wrapGAppsHook
]; ];

View File

@ -5,13 +5,13 @@
pythonPackages.buildPythonApplication rec { pythonPackages.buildPythonApplication rec {
name = "mopidy-${version}"; name = "mopidy-${version}";
version = "2.0.0"; version = "2.0.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mopidy"; owner = "mopidy";
repo = "mopidy"; repo = "mopidy";
rev = "v${version}"; rev = "v${version}";
sha256 = "06f1y87dqc7p6kq5npmg3ki8x4iacyjzd7nq7188x20y2zglrjbm"; sha256 = "15i17rj2bh2kda6d6rwcjhs2m3nfsrcyq3lj9vbgmacg0cdb22pp";
}; };
nativeBuildInputs = [ wrapGAppsHook ]; nativeBuildInputs = [ wrapGAppsHook ];

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "areca-7.5"; name = "areca-7.5";
src = fetchurl { src = fetchurl {
url = "http://downloads.sourceforge.net/project/areca/areca-stable/areca-7.5/areca-7.5-src.tar.gz"; url = "mirror://sourceforge/project/areca/areca-stable/areca-7.5/areca-7.5-src.tar.gz";
sha256 = "1q4ha9s96c1syplxm04bh1v1gvjq16l4pa8w25w95d2ywwvyq1xb"; sha256 = "1q4ha9s96c1syplxm04bh1v1gvjq16l4pa8w25w95d2ywwvyq1xb";
}; };
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
substituteInPlace bin/areca_run.sh --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar" substituteInPlace bin/areca_run.sh --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar"
sed -i "s#^PROGRAM_DIR.*#PROGRAM_DIR=$out#g" bin/areca_run.sh sed -i "s#^PROGRAM_DIR.*#PROGRAM_DIR=$out#g" bin/areca_run.sh
sed -i "s#^LIBRARY_PATH.*#LIBRARY_PATH=${swt}/lib:$out/lib:${acl}/lib#g" bin/areca_run.sh sed -i "s#^LIBRARY_PATH.*#LIBRARY_PATH=$out/lib:${stdenv.lib.makeLibraryPath [ swt acl ]}#g" bin/areca_run.sh
# https://sourceforge.net/p/areca/bugs/563/ # https://sourceforge.net/p/areca/bugs/563/
substituteInPlace bin/areca_run.sh --replace '[ "$JAVA_IMPL" = "java" ]' \ substituteInPlace bin/areca_run.sh --replace '[ "$JAVA_IMPL" = "java" ]' \

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
libCairo=$out/eclipse/libcairo-swt.so libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/eclipse/eclipse patchelf --set-interpreter $interpreter $out/eclipse/eclipse
[ -f $libCairo ] && patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $libCairo [ -f $libCairo ] && patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]} $libCairo
# Create wrapper script. Pass -configuration to store # Create wrapper script. Pass -configuration to store
# settings in ~/.eclipse/org.eclipse.platform_<version> rather # settings in ~/.eclipse/org.eclipse.platform_<version> rather
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \ makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
--prefix PATH : ${jdk}/bin \ --prefix PATH : ${jdk}/bin \
--prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk.out}/lib:${libXtst}/lib${stdenv.lib.optionalString (webkitgtk2 != null) ":${webkitgtk2}/lib"} \ --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath ([ glib gtk libXtst ] ++ stdenv.lib.optional (webkitgtk2 != null) webkitgtk2)} \
--add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration" --add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration"
# Create desktop item. # Create desktop item.

View File

@ -66,8 +66,9 @@ stdenv.mkDerivation rec {
else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no" else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
"--with-gif=no" "--with-tiff=no" ]; "--with-gif=no" "--with-tiff=no" ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX) NIX_CFLAGS_COMPILE =
"-I${cairo.dev}/include/cairo"; [ "-ffreestanding" ] # needed due to glibc 2.24 upgrade (see https://sourceware.org/glibc/wiki/Release/2.24#Known_Issues)
++ stdenv.lib.optional (stdenv.isDarwin && withX) "-I${cairo.dev}/include/cairo";
postInstall = '' postInstall = ''
mkdir -p $out/share/emacs/site-lisp/ mkdir -p $out/share/emacs/site-lisp/

View File

@ -25,13 +25,13 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "emacs-25.1-rc1"; name = "emacs-25.1-rc2";
builder = ./builder.sh; builder = ./builder.sh;
src = fetchurl { src = fetchurl {
url = "ftp://alpha.gnu.org/gnu/emacs/pretest/${name}.tar.xz"; url = "ftp://alpha.gnu.org/gnu/emacs/pretest/${name}.tar.xz";
sha256 = "0cv1hars9zxlv040h7f3zz50fhn67dqa18ms4hg9sdblckk50360"; sha256 = "1hffvyvl50mrivdv6lp92sbxi3l2zhblj8npmpbzk47zpl1mzm2v";
}; };
patches = lib.optionals stdenv.isDarwin [ patches = lib.optionals stdenv.isDarwin [

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "2.1.0"; version = "2.1.0";
src = fetchurl { src = fetchurl {
url = "http://sourceforge.net/projects/hte/files/ht-source/ht-${version}.tar.bz2"; url = "mirror://sourceforge/project/hte/ht-source/ht-${version}.tar.bz2";
sha256 = "0w2xnw3z9ws9qrdpb80q55h6ynhh3aziixcfn45x91bzrbifix9i"; sha256 = "0w2xnw3z9ws9qrdpb80q55h6ynhh3aziixcfn45x91bzrbifix9i";
}; };

View File

@ -62,7 +62,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
item=${desktopItem} item=${desktopItem}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \ makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
--prefix PATH : "$out/libexec/${name}:${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ --prefix PATH : "$out/libexec/${name}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--set JDK_HOME "$jdk" \ --set JDK_HOME "$jdk" \
--set ${hiName}_JDK "$jdk" \ --set ${hiName}_JDK "$jdk" \
--set ANDROID_JAVA_HOME "$jdk" \ --set ANDROID_JAVA_HOME "$jdk" \

View File

@ -24,12 +24,12 @@ let
unwrapped = unwrapped =
kdeDerivation rec { kdeDerivation rec {
name = "kile-${version}"; name = "kile-${version}";
version = "2016-07-02"; version = "2016-07-25";
src = fetchgit { src = fetchgit {
url = git://anongit.kde.org/kile.git; url = git://anongit.kde.org/kile.git;
rev = "d38bc7069667119cc891b351188484ca6fb88973"; rev = "9cad4757df2493a6099b89114340493c6b436d0b";
sha256 = "1nha71i16fs7nq2812b5565nbmbsbs3ak5czas6xg1dg5bsvdqh8"; sha256 = "0kikrkssfd7bj580iwsipirbz2klxvk0f7nfg5y9mkv0pnchx2mj";
}; };

View File

@ -1,28 +1,65 @@
{ stdenv, pythonPackages, fetchgit }: { stdenv, python3Packages, fetchFromGitHub, makeWrapper, makeDesktopItem }:
pythonPackages.buildPythonApplication rec { stdenv.mkDerivation rec {
name = "leo-editor-${version}"; name = "leo-editor-${version}";
namePrefix = ""; version = "5.3";
version = "5.1";
src = fetchgit { src = fetchFromGitHub {
url = "https://github.com/leo-editor/leo-editor"; owner = "leo-editor";
rev = "refs/tags/Leo-${version}-final"; repo = "leo-editor";
sha256 = "0km5mvzfpfbxxhcjr4if24qhgk2c7dsvmfinz0zrbfriip848vcp"; rev = version;
sha256 = "0whbay8ilabzpxdjaxv447y6bqbsilx161fv7wa15v3qqm2kapsp";
}; };
propagatedBuildInputs = with pythonPackages; [ pyqt4 sqlite3 ]; dontBuild = true;
buildInputs = [ makeWrapper python3Packages.python ];
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
patchPhase = '' desktopItem = makeDesktopItem rec {
rm setup.cfg name = "leo-editor";
exec = "leo %U";
icon = "leoapp32";
type = "Application";
comment = meta.description;
desktopName = "Leo";
genericName = "Text Editor";
categories = stdenv.lib.concatStringsSep ";" [
"Application" "Development" "IDE" "QT"
];
startupNotify = "false";
mimeType = stdenv.lib.concatStringsSep ";" [
"text/plain" "text/asp" "text/x-c" "text/x-script.elisp" "text/x-fortran"
"text/html" "application/inf" "text/x-java-source" "application/x-javascript"
"application/javascript" "text/ecmascript" "application/x-ksh" "text/x-script.ksh"
"application/x-tex" "text/x-script.rexx" "text/x-pascal" "text/x-script.perl"
"application/postscript" "text/x-script.scheme" "text/x-script.guile" "text/sgml"
"text/x-sgml" "application/x-bsh" "application/x-sh" "application/x-shar"
"text/x-script.sh" "application/x-tcl" "text/x-script.tcl" "application/x-texinfo"
"application/xml" "text/xml" "text/x-asm"
];
};
installPhase = ''
mkdir -p "$out/share/icons/hicolor/32x32/apps"
cp leo/Icons/leoapp32.png "$out/share/icons/hicolor/32x32/apps"
mkdir -p "$out/share/applications"
cp $desktopItem/share/applications/* $out/share/applications
mkdir -p $out/share/leo-editor
mv * $out/share/leo-editor
makeWrapper ${python3Packages.python}/bin/python3.5m $out/bin/leo \
--set PYTHONPATH "$PYTHONPATH:$out/share/leo-editor" \
--add-flags "-O $out/share/leo-editor/launchLeo.py"
''; '';
meta = { meta = with stdenv.lib; {
homepage = "http://leoeditor.com"; homepage = "http://leoeditor.com";
description = "A powerful folding editor"; description = "A powerful folding editor";
longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers."; longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";
license = stdenv.lib.licenses.mit; license = with licenses; [ mit ];
maintainers = with stdenv.lib.maintainers; [ leonardoce ]; maintainers = with maintainers; [ leonardoce ramkromberg ];
}; };
} }

View File

@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
wrapProgram $out/bin/tuxguitar \ wrapProgram $out/bin/tuxguitar \
--set JAVA "${jdk}/bin/java" \ --set JAVA "${jdk}/bin/java" \
--prefix LD_LIBRARY_PATH : "$out/lib/:${swt}/lib:${alsaLib.out}/lib" \ --prefix LD_LIBRARY_PATH : "$out/lib/:${stdenv.lib.makeLibraryPath [ swt alsaLib ]}" \
--prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar" --prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar"
''; '';

View File

@ -26,6 +26,15 @@ stdenv.mkDerivation rec {
${optionalString enableTiny "--enable-tiny"} ${optionalString enableTiny "--enable-tiny"}
''; '';
patchFlags = [ "-p0" ];
patches = optional stdenv.isDarwin
(fetchurl {
name = "darwin.patch";
url = "https://trac.macports.org/browser/trunk/dports/editors/nano/files/patch-src-winio.c.diff?rev=151356&format=txt";
sha256 = "184q33irz9px2svwr2qx70zvfby5zlwlhv4k607yzsy90fq2jpdd";
});
postPatch = stdenv.lib.optionalString stdenv.isDarwin '' postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/text.c --replace "__time_t" "time_t" substituteInPlace src/text.c --replace "__time_t" "time_t"
''; '';

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation {
mkdir -p $out/bin mkdir -p $out/bin
cp -a netbeans $out cp -a netbeans $out
makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \ makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \
--prefix PATH : ${jdk}/bin:${which}/bin \ --prefix PATH : ${stdenv.lib.makeBinPath [ jdk which ]} \
--prefix JAVA_HOME : ${jdk.home} \ --prefix JAVA_HOME : ${jdk.home} \
--add-flags "--jdkhome ${jdk.home}" --add-flags "--jdkhome ${jdk.home}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, vala, which, autoconf, automake { stdenv, fetchurl, pkgconfig, vala_0_26, which, autoconf, automake
, libtool, glib, gtk3, gnome3, libwnck3, asciidoc, python3Packages }: , libtool, glib, gtk3, gnome3, libwnck3, asciidoc, python3Packages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "145zxgaky5bcq5bxm4z7h0pvviq7k1nrgnf40q6nax6ik616ybjq"; sha256 = "145zxgaky5bcq5bxm4z7h0pvviq7k1nrgnf40q6nax6ik616ybjq";
}; };
buildInputs = [ pkgconfig vala which autoconf automake buildInputs = [ pkgconfig vala_0_26 which autoconf automake
libtool glib gtk3 libwnck3 asciidoc libtool glib gtk3 libwnck3 asciidoc
gnome3.gtksourceview gnome3.vte_290 python3Packages.pygments ]; gnome3.gtksourceview gnome3.vte_290 python3Packages.pygments ];

View File

@ -0,0 +1,33 @@
{stdenv, fetchgit, cmake, ninja, boost, libpng, glfw3, epoxy, guile, pkgconfig
, mesa, libX11, libpthreadstubs, libXau, libXdmcp, libXrandr, libXext
, libXinerama, libXxf86vm, libXcursor, libXfixes
}:
stdenv.mkDerivation rec {
version = "0.0pre20160820";
name = "ao-${version}";
buildInputs = [
cmake ninja boost libpng glfw3 epoxy guile pkgconfig mesa libX11
libpthreadstubs libXau libXdmcp libXrandr libXext libXinerama libXxf86vm
libXcursor libXfixes
];
src = fetchgit (stdenv.lib.importJSON ./src.json);
cmakeFlags = "-G Ninja";
buildPhase = "ninja";
installPhase = ''
ninja install
cd ..
cp lib/lib* bind/lib* "$out/lib"
cp -r bin "$out/bin"
mkdir "$out/doc"
cp -r doc "$out/doc/ao"
cp -r examples "$out/doc/ao/examples"
cp -r bind "$out/bind"
'';
meta = {
inherit version;
description = ''Homoiconic CAD package'';
license = stdenv.lib.licenses.gpl2Plus ; # Some parts can be extracted and used under LGPL2+
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,5 @@
{
"url": "https://github.com/mkeeter/ao",
"rev": "69fadb81543cc9031e4a7ec2036c7f2ab505a620",
"sha256": "1717k72vr0i5j7bvxmd6q16fpvkljnqfa1hr3i4yq8cjdsj69my7"
}

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
# Allow geeqie to find exiv2 and exiftran, necessary to # Allow geeqie to find exiv2 and exiftran, necessary to
# losslessly rotate JPEG images. # losslessly rotate JPEG images.
sed -i $out/lib/geeqie/geeqie-rotate \ sed -i $out/lib/geeqie/geeqie-rotate \
-e '1 a export PATH=${exiv2}/bin:${fbida}/bin:$PATH' -e '1 a export PATH=${stdenv.lib.makeBinPath [ exiv2 fbida ]}:$PATH'
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, gdk_pixbuf, scons, pkgconfig, gtk, glib, { stdenv, fetchFromGitHub, gdk_pixbuf, scons, pkgconfig, gtk, glib,
pcre, cfitsio, perl, gob2, vala, libtiff, json_glib }: pcre, cfitsio, perl, gob2, vala_0_23, libtiff, json_glib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "giv-20150811-git"; name = "giv-20150811-git";
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
installPhase = "scons install"; installPhase = "scons install";
buildInputs = [ gdk_pixbuf pkgconfig gtk glib scons pcre cfitsio perl gob2 vala libtiff buildInputs = [ gdk_pixbuf pkgconfig gtk glib scons pcre cfitsio perl gob2 vala_0_23 libtiff
json_glib ]; json_glib ];
meta = { meta = {

View File

@ -0,0 +1,31 @@
{ stdenv, fetchurl, gnome3, itstool, libxml2, pkgconfig, intltool,
exiv2, libjpeg, libtiff, gstreamer, libraw, libsoup, libsecret,
libchamplain, librsvg, libwebp, json_glib, webkit, lcms2, bison,
flex, wrapGAppsHook }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "gthumb";
version = "${major}.3";
major = "3.4";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${major}/${name}.tar.xz";
sha256 = "0pc2xl6kwhi5l3d0dj6nzdcj2vpihs7y1s3l1hwir8zy7cpx23y1";
};
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
buildInputs = with gnome3;
[ itstool libxml2 intltool glib gtk gsettings_desktop_schemas dconf
exiv2 libjpeg libtiff gstreamer libraw libsoup libsecret libchamplain
librsvg libwebp json_glib webkit lcms2 bison flex ];
meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/Apps/gthumb;
description = "Image browser and viewer for GNOME";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = [ maintainers.mimadrid ];
};
}

View File

@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin mkdir -p $out/bin
cp -r linux/work/* $out/${name}/ cp -r linux/work/* $out/${name}/
makeWrapper $out/${name}/processing $out/bin/processing \ makeWrapper $out/${name}/processing $out/bin/processing \
--prefix PATH : "${jdk}/bin:${which}/bin" \ --prefix PATH : "${stdenv.lib.makeBinPath [ jdk which ]}" \
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
makeWrapper $out/${name}/processing-java $out/bin/processing-java \ makeWrapper $out/${name}/processing-java $out/bin/processing-java \
--prefix PATH : "${jdk}/bin:${which}/bin" \ --prefix PATH : "${stdenv.lib.makeBinPath [ jdk which ]}" \
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
ln -s ${jdk} $out/${name}/java ln -s ${jdk} $out/${name}/java
''; '';

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
''; '';
qmakeFlags = [ qmakeFlags = [
"EXIV2PATH=${exiv2}/include/exiv2" "EXIV2PATH=${exiv2.dev}/include/exiv2"
"OPENEXRDIR=${openexr}/include/OpenEXR" "OPENEXRDIR=${openexr}/include/OpenEXR"
"FFTW3DIR=${fftwSinglePrec.dev}/include" "FFTW3DIR=${fftwSinglePrec.dev}/include"
"LIBTIFFDIR=${libtiff.dev}/include" "LIBTIFFDIR=${libtiff.dev}/include"

View File

@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
patchPhase = '' patchPhase = ''
${myPatchElf "opt/brother/scanner/brscan4/brsaneconfig4"} ${myPatchElf "opt/brother/scanner/brscan4/brsaneconfig4"}
RPATH=${libusb}/lib RPATH=${libusb.out}/lib
for a in usr/lib64/sane/*.so*; do for a in usr/lib64/sane/*.so*; do
if ! test -L $a; then if ! test -L $a; then
patchelf --set-rpath $RPATH $a patchelf --set-rpath $RPATH $a

View File

@ -55,7 +55,7 @@ stdenv.mkDerivation {
--replace "RUN+=\"/bin/sh" "RUN+=\"${stdenv.shell}" --replace "RUN+=\"/bin/sh" "RUN+=\"${stdenv.shell}"
substituteInPlace $out/lib/libsane.la \ substituteInPlace $out/lib/libsane.la \
--replace "-ljpeg" "-L${libjpeg}/lib -ljpeg" --replace "-ljpeg" "-L${libjpeg.out}/lib -ljpeg"
'' + stdenv.lib.concatStrings (builtins.map installFirmware compatFirmware); '' + stdenv.lib.concatStrings (builtins.map installFirmware compatFirmware);
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala, sqlite { fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala_0_28, sqlite
, webkitgtk, pkgconfig, gnome3, gst_all_1, which, udev, libgudev, libraw, glib, json_glib , webkitgtk, pkgconfig, gnome3, gst_all_1, which, udev, libgudev, libraw, glib, json_glib
, gettext, desktop_file_utils, lcms2, gdk_pixbuf, librsvg, makeWrapper , gettext, desktop_file_utils, lcms2, gdk_pixbuf, librsvg, wrapGAppsHook
, gnome_doc_utils, hicolor_icon_theme, itstool }: , gnome_doc_utils, hicolor_icon_theme, itstool }:
# for dependencies see http://www.yorba.org/projects/shotwell/install/ # for dependencies see http://www.yorba.org/projects/shotwell/install/
@ -8,12 +8,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "${major}.${minor}"; version = "${major}.${minor}";
major = "0.23"; major = "0.23";
minor = "4"; minor = "5";
name = "shotwell-${version}"; name = "shotwell-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/shotwell/${major}/${name}.tar.xz"; url = "mirror://gnome/sources/shotwell/${major}/${name}.tar.xz";
sha256 = "1hnl0lxibklmr1cy95ij1b3jgvdsw4zlcja53ngfxvlsi2r2bbxi"; sha256 = "0fgs1rgvkmy79bmpxrsvm5w8rvqml4l1vnwma0xqx5zzm02p8a07";
}; };
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include"; NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include";
@ -24,19 +24,11 @@ stdenv.mkDerivation rec {
patchShebangs . patchShebangs .
''; '';
preFixup = '' buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala_0_28 sqlite webkitgtk
wrapProgram "$out/bin/shotwell" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
'';
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkitgtk
pkgconfig gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee pkgconfig gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee
which udev libgudev gnome3.gexiv2 hicolor_icon_theme which udev libgudev gnome3.gexiv2 hicolor_icon_theme
libraw json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg libraw json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg
makeWrapper gnome_doc_utils gnome3.rest wrapGAppsHook gnome_doc_utils gnome3.rest
gnome3.defaultIconTheme itstool ]; gnome3.defaultIconTheme itstool ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, cairo, colord, glib, gtk3, gusb, intltool, itstool { stdenv, fetchurl, cairo, colord, glib, gtk3, gusb, intltool, itstool
, libusb1, libxml2, pkgconfig, sane-backends, vala, wrapGAppsHook , libusb1, libxml2, pkgconfig, sane-backends, vala_0_23, wrapGAppsHook
, gnome3 }: , gnome3 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ cairo colord glib gusb gtk3 libusb1 libxml2 sane-backends buildInputs = [ cairo colord glib gusb gtk3 libusb1 libxml2 sane-backends
vala ]; vala_0_23 ];
nativeBuildInputs = [ intltool itstool pkgconfig wrapGAppsHook ]; nativeBuildInputs = [ intltool itstool pkgconfig wrapGAppsHook ];
configureFlags = [ "--disable-packagekit" ]; configureFlags = [ "--disable-packagekit" ];

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl { stdenv, fetchurl
, ghostscript, atk, gtk, glib, fontconfig, freetype , ghostscript, atk, gtk, glib, fontconfig, freetype
, libgnomecanvas, libgnomeprint, libgnomeprintui , libgnomecanvas, libgnomeprint, libgnomeprintui
, pango, libX11, xproto, zlib, poppler, poppler_data , pango, libX11, xproto, zlib, poppler
, autoconf, automake, libtool, pkgconfig}: , autoconf, automake, libtool, pkgconfig}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.4.8"; version = "0.4.8";
@ -14,12 +14,12 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
ghostscript atk gtk glib fontconfig freetype ghostscript atk gtk glib fontconfig freetype
libgnomecanvas libgnomeprint libgnomeprintui libgnomecanvas libgnomeprint libgnomeprintui
pango libX11 xproto zlib poppler poppler_data pango libX11 xproto zlib poppler
]; ];
nativeBuildInputs = [ autoconf automake libtool pkgconfig ]; nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
NIX_LDFLAGS="-lX11 -lz"; NIX_LDFLAGS = [ "-lX11" "-lz" ];
meta = { meta = {
homepage = http://xournal.sourceforge.net/; homepage = http://xournal.sourceforge.net/;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation {
ln -s $out/{nix-support,bin}/wavesurfer.tcl ln -s $out/{nix-support,bin}/wavesurfer.tcl
wrapProgram "$out/nix-support/wavesurfer.tcl" \ wrapProgram "$out/nix-support/wavesurfer.tcl" \
--set TCLLIBPATH "${snack}/lib" \ --set TCLLIBPATH "${snack}/lib" \
--prefix PATH : "${tcl}/bin:${tk}/bin" --prefix PATH : "${stdenv.lib.makeBinPath [ tcl tk ]}"
''; '';
meta = { meta = {

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk mono]}" export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk mono]}"
# We need PATH from user env for xdg-open to find its tools, which # We need PATH from user env for xdg-open to find its tools, which
# typically depend on the currently running desktop environment. # typically depend on the currently running desktop environment.
export PATH="${avrgcclibc}/bin:${avrdude}/bin:${xdg_utils}/bin:\$PATH" export PATH="${stdenv.lib.makeBinPath [ avrgcclibc avrdude xdg_utils ]}:\$PATH"
# avrdudess must have its resource files in its current working directory # avrdudess must have its resource files in its current working directory
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@" cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, SDL, boost, cmake, ffmpeg, gettext, glew { stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libjpeg, libpng, libsamplerate, libsndfile , ilmbase, libXi, libX11, libjpeg, libpng, libsamplerate, libsndfile
, libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg, python , libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg, python
, zlib, fftw, opensubdiv , zlib, fftw, opensubdiv, freetype
, jackaudioSupport ? false, libjack2 , jackaudioSupport ? false, libjack2
, cudaSupport ? false, cudatoolkit , cudaSupport ? false, cudatoolkit
, colladaSupport ? true, opencollada , colladaSupport ? true, opencollada
@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
}; };
buildInputs = buildInputs =
[ SDL boost cmake ffmpeg gettext glew ilmbase libXi [ boost cmake ffmpeg gettext glew ilmbase libXi libX11 freetype
libjpeg libpng libsamplerate libsndfile libtiff mesa openal libjpeg libpng libsamplerate libsndfile libtiff mesa openal
opencolorio openexr openimageio /* openjpeg */ python zlib fftw opencolorio openexr openimageio openjpeg python zlib fftw
(opensubdiv.override { inherit cudaSupport; }) (opensubdiv.override { inherit cudaSupport; })
] ]
++ optional jackaudioSupport libjack2 ++ optional jackaudioSupport libjack2
@ -41,12 +41,15 @@ stdenv.mkDerivation rec {
"-DWITH_SDL=ON" "-DWITH_SDL=ON"
"-DWITH_GAMEENGINE=ON" "-DWITH_GAMEENGINE=ON"
"-DWITH_OPENCOLORIO=ON" "-DWITH_OPENCOLORIO=ON"
"-DWITH_SYSTEM_OPENJPEG=ON"
"-DWITH_PLAYER=ON" "-DWITH_PLAYER=ON"
"-DWITH_OPENSUBDIV=ON" "-DWITH_OPENSUBDIV=ON"
"-DPYTHON_LIBRARY=python${python.majorVersion}m" "-DPYTHON_LIBRARY=python${python.majorVersion}m"
"-DPYTHON_LIBPATH=${python}/lib" "-DPYTHON_LIBPATH=${python}/lib"
"-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m" "-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
"-DPYTHON_VERSION=${python.majorVersion}" "-DPYTHON_VERSION=${python.majorVersion}"
"-DWITH_PYTHON_INSTALL=OFF"
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
] ]
++ optional jackaudioSupport "-DWITH_JACK=ON" ++ optional jackaudioSupport "-DWITH_JACK=ON"
++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON" ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, pyqt5, sip_4_16, poppler_utils, pkgconfig, libpng { stdenv, fetchurl, python, pyqt5, sip, poppler_utils, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmakeHook, icu, sqlite , imagemagick, libjpeg, fontconfig, podofo, qtbase, qmakeHook, icu, sqlite
, makeWrapper, unrarSupport ? false, chmlib, pythonPackages, xz, libusb1, libmtp , makeWrapper, unrarSupport ? false, chmlib, pythonPackages, xz, libusb1, libmtp
, xdg_utils, makeDesktopItem , xdg_utils, makeDesktopItem
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
prePatch = '' prePatch = ''
sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':" \ sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip/PyQt5':" \
setup/build_environment.py setup/build_environment.py
''; '';
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper pkgconfig qmakeHook ]; nativeBuildInputs = [ makeWrapper pkgconfig qmakeHook ];
buildInputs = buildInputs =
[ python pyqt5 sip_4_16 poppler_utils libpng imagemagick libjpeg [ python pyqt5 sip poppler_utils libpng imagemagick libjpeg
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil
pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
export FC_LIB_DIR=${fontconfig.lib}/lib export FC_LIB_DIR=${fontconfig.lib}/lib
export PODOFO_INC_DIR=${podofo}/include/podofo export PODOFO_INC_DIR=${podofo}/include/podofo
export PODOFO_LIB_DIR=${podofo}/lib export PODOFO_LIB_DIR=${podofo}/lib
export SIP_BIN=${sip_4_16}/bin/sip export SIP_BIN=${sip}/bin/sip
python setup.py install --prefix=$out python setup.py install --prefix=$out
PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py

View File

@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
cp ding.png $out/share/pixmaps/ cp ding.png $out/share/pixmaps/
cp ding.desktop $out/share/applications/ cp ding.desktop $out/share/applications/
wrapProgram $out/bin/ding --prefix PATH : ${gnugrep}/bin:${aspellEnv}/bin:${tk}/bin:${fortune}/bin --prefix ASPELL_CONF : "\"prefix ${aspellEnv};\"" wrapProgram $out/bin/ding --prefix PATH : ${stdenv.lib.makeBinPath [ gnugrep aspellEnv tk fortune ]} --prefix ASPELL_CONF : "\"prefix ${aspellEnv};\""
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "emem"; pname = "emem";
version = "0.2.24"; version = "0.2.27";
name = "${pname}-${version}"; name = "${pname}-${version}";
inherit jdk; inherit jdk;
src = fetchurl { src = fetchurl {
url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar"; url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar";
sha256 = "0h20vpd4gkg1m5mn3fkgrmjgf9w640b7w2500nn0pswmvqawrhpi"; sha256 = "0zmh152dfgsq2yj14wb3504pyibq4r671q5yz6yy28ihym7qr0fd";
}; };
buildInputs = [ ]; buildInputs = [ ];

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchgit, makeWrapper { stdenv, lib, fetchgit, makeWrapper
, pkgconfig, cmake, libxml2, vala, intltool, libmx, gnome3, gtk3, gtk_doc , pkgconfig, cmake, libxml2, vala_0_23, intltool, libmx, gnome3, gtk3, gtk_doc
, keybinder3, clutter_gtk, libnotify , keybinder3, clutter_gtk, libnotify
, libxkbcommon, xorg, udev , libxkbcommon, xorg, udev
, bashInteractive , bashInteractive
@ -15,7 +15,7 @@ stdenv.mkDerivation {
}; };
buildInputs = [ buildInputs = [
pkgconfig cmake vala intltool gtk3 gnome3.gnome_common gnome3.libgee pkgconfig cmake vala_0_23 intltool gtk3 gnome3.gnome_common gnome3.libgee
gtk_doc clutter_gtk libmx keybinder3 libxml2 libnotify makeWrapper gtk_doc clutter_gtk libmx keybinder3 libxml2 libnotify makeWrapper
xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence
libxkbcommon libxkbcommon
@ -41,7 +41,7 @@ stdenv.mkDerivation {
wrapProgram "$out/bin/finalterm" \ wrapProgram "$out/bin/finalterm" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules" \ --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "${gnome3.defaultIconTheme}/share:${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" --prefix XDG_DATA_DIRS : "${gnome3.defaultIconTheme}/share:${gnome3.gtk.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
''; '';
meta = with lib; { meta = with lib; {

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, makeWrapper, automake, autoconf, libtool, { stdenv, fetchFromGitHub, makeWrapper, automake, autoconf, libtool,
pkgconfig, file, intltool, libxml2, json_glib , sqlite, itstool, pkgconfig, file, intltool, libxml2, json_glib , sqlite, itstool,
vala, gnome3, wrapGAppsHook vala_0_32, gnome3, wrapGAppsHook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
automake autoconf libtool automake autoconf libtool
file file
intltool intltool
vala vala_0_32
gnome3.yelp_tools gnome3.yelp_tools
wrapGAppsHook wrapGAppsHook
]; ];

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
version = "1.33.0"; version = "1.33.0";
src = fetchurl { src = fetchurl {
url = "http://sourceforge.net/projects/gammu/files/gammu/${version}/gammu-${version}.tar.xz"; url = "mirror://sourceforge/project/gammu/gammu/${version}/gammu-${version}.tar.xz";
sha256 = "18gplx1v9d70k1q86d5i4n4dfpx367g34pj3zscppx126vwhv112"; sha256 = "18gplx1v9d70k1q86d5i4n4dfpx367g34pj3zscppx126vwhv112";
}; };

View File

@ -18,7 +18,7 @@ buildPerlPackage {
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/man/man1 mkdir -p $out/bin $out/share/man/man1
cp get_iplayer $out/bin cp get_iplayer $out/bin
wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg.bin}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB wrapProgram $out/bin/get_iplayer --suffix PATH : ${stdenv.lib.makeBinPath [ ffmpeg flvstreamer vlc rtmpdump ]} --prefix PERL5LIB : $PERL5LIB
cp get_iplayer.1 $out/share/man/man1 cp get_iplayer.1 $out/share/man/man1
''; '';

View File

@ -1,9 +1,7 @@
{ stdenv, fetchurl, makeWrapper, pkgconfig, zip, python { stdenv, callPackage, overrideCC, fetchurl, makeWrapper, pkgconfig
, zlib, xapian, which , icu, libmicrohttpd , lzma, zimlib , zip, python, zlib, which, icu, libmicrohttpd, lzma, ctpp2, aria2, wget, bc
, ctpp2, aria2, wget , bc, libuuid , glibc, libX11 , libuuid, glibc, libX11, libXext, libXt, libXrender, glib, dbus, dbus_glib
, libXext, libXt, libXrender , glib, dbus, dbus_glib, gtk , gtk, gdk_pixbuf, pango, cairo , freetype, fontconfig, alsaLib, atk
, gdk_pixbuf, pango, cairo , freetype, fontconfig, alsaLib
, atk
}: }:
let let
@ -31,6 +29,9 @@ let
sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg"; sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg";
}; };
xapian = callPackage ../../../development/libraries/xapian { inherit stdenv; };
zimlib = callPackage ../../../development/libraries/zimlib { inherit stdenv; };
in in
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -97,7 +98,7 @@ stdenv.mkDerivation rec {
rm $out/bin/kiwix rm $out/bin/kiwix
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \ makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
--suffix LD_LIBRARY_PATH : `cat ${stdenv.cc}/nix-support/orig-cc`/lib:${makeLibraryPath [libX11 libXext libXt libXrender glib dbus dbus_glib gtk gdk_pixbuf pango cairo freetype fontconfig alsaLib atk]} \ --suffix LD_LIBRARY_PATH : ${makeLibraryPath [stdenv.cc.cc libX11 libXext libXt libXrender glib dbus dbus_glib gtk gdk_pixbuf pango cairo freetype fontconfig alsaLib atk]} \
--suffix PATH : ${aria2}/bin --suffix PATH : ${aria2}/bin
''; '';
@ -106,6 +107,5 @@ stdenv.mkDerivation rec {
homepage = http://kiwix.org; homepage = http://kiwix.org;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [ robbinch ]; maintainers = with maintainers; [ robbinch ];
broken = true;
}; };
} }

View File

@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
dontStrip = true; dontStrip = true;
configurePhase = '' configurePhase = ''
sed -i -e 's+-I \$srcdir/mupdf/include -I \$srcdir/mupdf/thirdparty/freetype/include+-I ${freetype}/include+' build.sh sed -i -e 's+-I \$srcdir/mupdf/include -I \$srcdir/mupdf/thirdparty/freetype/include+-I ${freetype.dev}/include+' build.sh
sed -i -e 's+-lmupdf +-lfreetype -lz -lharfbuzz -ljbig2dec -lopenjp2 -ljpeg -lmupdf +' build.sh sed -i -e 's+-lmupdf +-lfreetype -lz -lharfbuzz -ljbig2dec -lopenjp2 -ljpeg -lmupdf +' build.sh
sed -i -e 's+-L\$srcdir/mupdf/build/native ++' build.sh sed -i -e 's+-L\$srcdir/mupdf/build/native ++' build.sh
''; '';

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "3.3.8"; version = "3.3.8";
src = fetchurl { src = fetchurl {
url = "https://downloads.sourceforge.net/project/mlterm/01release/${name}/${name}.tar.gz"; url = "mirror://sourceforge/project/mlterm/01release/${name}/${name}.tar.gz";
sha256 = "088pgxynzxxii7wdmjp2fdkxydirx4k05588zkhlzalkb5l8ji1i"; sha256 = "088pgxynzxxii7wdmjp2fdkxydirx4k05588zkhlzalkb5l8ji1i";
}; };

View File

@ -18,17 +18,32 @@ stdenv.mkDerivation rec {
url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958"; url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958";
sha256 = "1g9fkd1f5rx1z043vr9dj4934qf7i4nkvbwjc61my9azjrrc3jv7"; sha256 = "1g9fkd1f5rx1z043vr9dj4934qf7i4nkvbwjc61my9azjrrc3jv7";
}) })
# Compatibility with new openjpeg
(fetchpatch {
name = "mupdf-1.5-openjpeg-2.1.0.patch";
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/mupdf-1.5-openjpeg-2.1.0.patch?h=packages/mupdf&id=ca5e3ef6c7788ccfb6011d785078bc47762f19e5";
sha256 = "0f18793q9fd22h3lclm8wahvc8az4v08an6lzy8mczrkl8mcgm3k";
})
]; ];
NIX_CFLAGS_COMPILE= [ "-fPIC" ]; NIX_CFLAGS_COMPILE= [ "-fPIC" ];
makeFlags = [ "prefix=$(out)" ];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ zlib freetype libX11 libXcursor libXext harfbuzz mesa libXrandr libXinerama ]; buildInputs = [ zlib libX11 libXcursor libXext harfbuzz mesa libXrandr libXinerama freetype libjpeg jbig2dec openjpeg ];
outputs = [ "out" "bin" "doc" ];
installPhase = '' preConfigure = ''
make install prefix=$out # Don't remove mujs because upstream version is incompatible
gcc -shared -o $out/lib/libmupdf.so.${version} -Wl,--whole-archive $out/lib/libmupdf.a -Wl,--no-whole-archive rm -rf thirdparty/{curl,freetype,glfw,harfbuzz,jbig2dec,jpeg,openjpeg,zlib}
'';
ln -s $out/lib/libmupdf.so.${version} $out/lib/libmupdf.so postInstall = ''
for i in $out/lib/*.a; do
so="''${i%.a}.so"
gcc -shared -o $so.${version} -Wl,--whole-archive $i -Wl,--no-whole-archive
ln -s $so.${version} $so
rm $i
done
mkdir -p "$out/lib/pkgconfig" mkdir -p "$out/lib/pkgconfig"
cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
@ -38,23 +53,24 @@ stdenv.mkDerivation rec {
Name: mupdf Name: mupdf
Description: Library for rendering PDF documents Description: Library for rendering PDF documents
Requires: freetype2 libopenjp2 libcrypto
Version: ${version} Version: ${version}
Libs: -L$out/lib -lmupdf Libs: -L$out/lib -lmupdf -lmupdfthird
Cflags: -I$out/include Cflags: -I$out/include
EOF EOF
mkdir -p $out/share/applications moveToOutput "bin" "$bin"
cat > $out/share/applications/mupdf.desktop <<EOF mkdir -p $bin/share/applications
cat > $bin/share/applications/mupdf.desktop <<EOF
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Version=1.0 Version=1.0
Name=mupdf Name=mupdf
Comment=PDF viewer Comment=PDF viewer
Exec=$out/bin/mupdf-x11 %f Exec=$bin/bin/mupdf-x11 %f
Terminal=false Terminal=false
EOF EOF
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig, vala, gtk3, libgee { stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig, vala_0_26, gtk3, libgee
, poppler, libpthreadstubs, gstreamer, gst-plugins-base, librsvg }: , poppler, libpthreadstubs, gstreamer, gst-plugins-base, librsvg }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ gstreamer gst-plugins-base vala gtk3 libgee poppler buildInputs = [ gstreamer gst-plugins-base vala_0_26 gtk3 libgee poppler
libpthreadstubs makeWrapper librsvg ]; libpthreadstubs makeWrapper librsvg ];
postInstall = '' postInstall = ''

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--with-libxml2=${libxml2}" "--with-libxml2=${libxml2}"
"--with-libxslt=${libxslt}" "--with-libxslt=${libxslt.dev}"
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

Some files were not shown because too many files have changed in this diff Show More