Merge remote-tracking branch 'origin/master' into hardened-stdenv
This commit is contained in:
commit
c0fa26ef3b
@ -659,4 +659,22 @@ src = fetchFromGitHub {
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</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>
|
||||
|
@ -740,7 +740,7 @@ to the `stack.yaml` like the following:
|
||||
enable: true
|
||||
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
|
||||
can achieve the same effect by hand. First of all, run
|
||||
|
||||
|
@ -291,8 +291,8 @@ pyfftw = buildPythonPackage rec {
|
||||
# Tests cannot import pyfftw. pyfftw works fine though.
|
||||
doCheck = false;
|
||||
|
||||
LDFLAGS="-L${pkgs.fftw}/lib -L${pkgs.fftwFloat}/lib -L${pkgs.fftwLongDouble}/lib"
|
||||
CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include"
|
||||
LDFLAGS="-L${pkgs.fftw.dev}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib"
|
||||
CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
@ -503,9 +503,12 @@ and can be used as:
|
||||
|
||||
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 `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.
|
||||
|
||||
As in Perl, dependencies on other Python packages can be specified in the
|
||||
|
@ -39,6 +39,7 @@
|
||||
aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
|
||||
arobyn = "Alexei Robyn <shados@shados.net>";
|
||||
artuuge = "Artur E. Ruuge <artuuge@gmail.com>";
|
||||
ashalkhakov = "Artyom Shalkhakov <artyom.shalkhakov@gmail.com>";
|
||||
asppsa = "Alastair Pharo <asppsa@gmail.com>";
|
||||
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
|
||||
aszlig = "aszlig <aszlig@redmoonstudios.org>";
|
||||
@ -99,6 +100,7 @@
|
||||
davidak = "David Kleuker <post@davidak.de>";
|
||||
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
||||
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
|
||||
dbrock = "Daniel Brockman <daniel@brockman.se>";
|
||||
deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>";
|
||||
demin-dmitriy = "Dmitriy Demin <demindf@gmail.com>";
|
||||
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
|
||||
@ -127,7 +129,7 @@
|
||||
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
||||
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
|
||||
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>";
|
||||
exlevan = "Alexey Levan <exlevan@gmail.com>";
|
||||
expipiplus1 = "Joe Hermaszewski <nix@monoid.al>";
|
||||
|
@ -98,4 +98,19 @@ rec {
|
||||
*/
|
||||
importJSON = 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}";
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/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
|
||||
|
@ -29,7 +29,7 @@
|
||||
</group>
|
||||
<sbr />
|
||||
<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>--fast</option></arg>
|
||||
<arg><option>--rollback</option></arg>
|
||||
@ -212,12 +212,11 @@ $ ./result/bin/run-*-vm
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--install-grub</option></term>
|
||||
<term><option>--install-bootloader</option></term>
|
||||
<listitem>
|
||||
<para>Causes the GRUB boot loader to be (re)installed on the
|
||||
device specified by the
|
||||
<varname>boot.loader.grub.device</varname> configuration
|
||||
option.</para>
|
||||
<para>Causes the boot loader to be (re)installed on the
|
||||
device specified by the relevant configuration options.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -58,6 +58,14 @@ following incompatible changes:</para>
|
||||
official documentation</link>.</para>
|
||||
</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>
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ rec {
|
||||
cp ${./test-driver/Logger.pm} $libDir/Logger.pm
|
||||
|
||||
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"
|
||||
'';
|
||||
};
|
||||
|
@ -3,6 +3,95 @@
|
||||
with lib;
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@ -64,9 +153,7 @@ in
|
||||
};
|
||||
|
||||
substitutions = mkOption {
|
||||
type = types.str // {
|
||||
check = flip elem ["none" "free" "combi" "ms"];
|
||||
};
|
||||
type = types.nullOr (types.enum ["free" "combi" "ms"]);
|
||||
default = "free";
|
||||
description = ''
|
||||
Font substitutions to replace common Type 1 fonts with nicer
|
||||
@ -77,35 +164,12 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
rendering = mkOption {
|
||||
type = types.attrs;
|
||||
default = pkgs.fontconfig-ultimate.rendering.ultimate;
|
||||
preset = mkOption {
|
||||
type = types.enum ["ultimate1" "ultimate2" "ultimate3" "ultimate4" "ultimate5" "osx" "windowsxp"];
|
||||
default = "ultimate3";
|
||||
description = ''
|
||||
FreeType rendering settings presets. The default is
|
||||
<literal>pkgs.fontconfig-ultimate.rendering.ultimate</literal>.
|
||||
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>.
|
||||
FreeType rendering settings preset. Any of the presets may be
|
||||
customized by setting environment variables.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -114,80 +178,11 @@ in
|
||||
|
||||
};
|
||||
|
||||
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
|
||||
|
||||
config =
|
||||
let ultimate = config.fonts.fontconfig.ultimate;
|
||||
fontconfigUltimateConf = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
fonts.fontconfig.confPackages = [ confPkg ];
|
||||
environment.variables."INFINALITY_FT" = cfg.preset;
|
||||
|
||||
${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;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -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, ... }:
|
||||
|
||||
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 = {
|
||||
@ -21,6 +221,15 @@ with lib;
|
||||
'';
|
||||
};
|
||||
|
||||
confPackages = mkOption {
|
||||
internal = true;
|
||||
type = with types; listOf path;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Fontconfig configuration packages.
|
||||
'';
|
||||
};
|
||||
|
||||
antialias = mkOption {
|
||||
type = types.bool;
|
||||
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 = {
|
||||
monospace = mkOption {
|
||||
type = types.listOf types.str;
|
||||
@ -142,136 +360,11 @@ with lib;
|
||||
};
|
||||
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
fonts.fontconfig.confPackages = [ confPkg ];
|
||||
|
||||
config =
|
||||
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/";
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -62,6 +62,18 @@ in
|
||||
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 {
|
||||
example = "ldap://ldap.example.org/";
|
||||
description = "The URL of the LDAP server.";
|
||||
|
@ -8,7 +8,7 @@ let
|
||||
|
||||
inherit (config.services.avahi) nssmdns;
|
||||
inherit (config.services.samba) nsswins;
|
||||
ldap = config.users.ldap.enable;
|
||||
ldap = (config.users.ldap.enable && config.users.ldap.nsswitch);
|
||||
|
||||
in
|
||||
|
||||
|
@ -8,7 +8,7 @@ let
|
||||
|
||||
devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1));
|
||||
|
||||
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
|
||||
modprobe = "${pkgs.kmod}/bin/modprobe";
|
||||
|
||||
in
|
||||
|
||||
|
9
nixos/modules/hardware/video/amdgpu.nix
Normal file
9
nixos/modules/hardware/video/amdgpu.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
config = mkIf (elem "amdgpu" config.services.xserver.videoDrivers) {
|
||||
boot.blacklistedKernelModules = [ "radeon" ];
|
||||
};
|
||||
}
|
||||
|
@ -75,7 +75,6 @@ in
|
||||
serviceConfig = {
|
||||
ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
|
||||
};
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ in
|
||||
|
||||
# and load it back on resume
|
||||
powerManagement.resumeCommands = ''
|
||||
export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
|
||||
${pkgs.kmod}/bin/modprobe -v facetimehd
|
||||
'';
|
||||
|
||||
|
@ -260,7 +260,7 @@ touch $mountPoint/etc/NIXOS
|
||||
# configuration.
|
||||
echo "finalising the installation..."
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -33,7 +33,11 @@ while [ "$#" -gt 0 ]; do
|
||||
action="$i"
|
||||
;;
|
||||
--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)
|
||||
buildNix=
|
||||
|
@ -37,9 +37,10 @@
|
||||
./hardware/network/rtl8192c.nix
|
||||
./hardware/opengl.nix
|
||||
./hardware/pcmcia.nix
|
||||
./hardware/video/amdgpu.nix
|
||||
./hardware/video/ati.nix
|
||||
./hardware/video/bumblebee.nix
|
||||
./hardware/video/nvidia.nix
|
||||
./hardware/video/ati.nix
|
||||
./hardware/video/webcam/facetimehd.nix
|
||||
./i18n/input-method/default.nix
|
||||
./i18n/input-method/fcitx.nix
|
||||
@ -340,6 +341,7 @@
|
||||
./services/networking/freenet.nix
|
||||
./services/networking/gale.nix
|
||||
./services/networking/gateone.nix
|
||||
./services/networking/gdomap.nix
|
||||
./services/networking/git-daemon.nix
|
||||
./services/networking/gnunet.nix
|
||||
./services/networking/gogoclient.nix
|
||||
|
@ -103,10 +103,9 @@ in
|
||||
};
|
||||
|
||||
security.setuidPrograms = [ "su" "chfn" ]
|
||||
++ [ "newuidmap" "newgidmap" ] # new in shadow 4.2.x
|
||||
++ lib.optionals config.users.mutableUsers
|
||||
[ "passwd" "sg" "newgrp"
|
||||
"newuidmap" "newgidmap" # new in shadow 4.2.x
|
||||
];
|
||||
[ "passwd" "sg" "newgrp" ];
|
||||
|
||||
};
|
||||
|
||||
|
@ -137,6 +137,9 @@ with lib;
|
||||
# Unity3D
|
||||
(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.
|
||||
(mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ])
|
||||
(mkRemovedOptionModule [ "programs" "bash" "enable" ])
|
||||
|
@ -221,7 +221,7 @@ let
|
||||
(''
|
||||
# Account management.
|
||||
account sufficient pam_unix.so
|
||||
${optionalString config.users.ldap.enable
|
||||
${optionalString use_ldap
|
||||
"account sufficient ${pam_ldap}/lib/security/pam_ldap.so"}
|
||||
${optionalString config.krb5.enable
|
||||
"account sufficient ${pam_krb5}/lib/security/pam_krb5.so"}
|
||||
@ -261,7 +261,7 @@ let
|
||||
"auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"}
|
||||
${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}"}
|
||||
${optionalString config.users.ldap.enable
|
||||
${optionalString use_ldap
|
||||
"auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"}
|
||||
${optionalString config.krb5.enable ''
|
||||
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"}
|
||||
${optionalString cfg.pamMount
|
||||
"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"}
|
||||
${optionalString config.krb5.enable
|
||||
"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"}
|
||||
${optionalString config.security.pam.enableEcryptfs
|
||||
"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"}
|
||||
${optionalString config.krb5.enable
|
||||
"session optional ${pam_krb5}/lib/security/pam_krb5.so"}
|
||||
@ -322,6 +322,7 @@ let
|
||||
|
||||
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;
|
||||
|
||||
# Create a limits.conf(5) file.
|
||||
|
@ -77,15 +77,11 @@ in
|
||||
preStart = ''
|
||||
${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
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
fi
|
||||
echo "${cfg.openssh.privateKey}" > /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
|
||||
if ! [ -f /var/lib/buildkite-agent/.ssh/id_rsa.pub ]; then
|
||||
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
|
||||
fi
|
||||
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
|
||||
'';
|
||||
|
||||
serviceConfig =
|
||||
|
@ -166,7 +166,7 @@ in
|
||||
|
||||
buildMachinesFiles = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
default = [ "/etc/nix/machines" ];
|
||||
example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ];
|
||||
description = "List of files containing build machines.";
|
||||
};
|
||||
@ -193,7 +193,9 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
users.extraGroups.hydra = { };
|
||||
users.extraGroups.hydra = {
|
||||
gid = config.ids.gids.hydra;
|
||||
};
|
||||
|
||||
users.extraUsers.hydra =
|
||||
{ description = "Hydra";
|
||||
@ -201,6 +203,7 @@ in
|
||||
createHome = true;
|
||||
home = baseDir;
|
||||
useDefaultShell = true;
|
||||
uid = config.ids.uids.hydra;
|
||||
};
|
||||
|
||||
users.extraUsers.hydra-queue-runner =
|
||||
@ -208,12 +211,14 @@ in
|
||||
group = "hydra";
|
||||
useDefaultShell = true;
|
||||
home = "${baseDir}/queue-runner"; # really only to keep SSH happy
|
||||
uid = config.ids.uids.hydra-queue-runner;
|
||||
};
|
||||
|
||||
users.extraUsers.hydra-www =
|
||||
{ description = "Hydra web server";
|
||||
group = "hydra";
|
||||
useDefaultShell = true;
|
||||
uid = config.ids.uids.hydra-www;
|
||||
};
|
||||
|
||||
nix.trustedUsers = [ "hydra-queue-runner" ];
|
||||
|
@ -72,8 +72,6 @@ in
|
||||
ExecStart = "${tlp}/bin/tlp init start";
|
||||
ExecStop = "${tlp}/bin/tlp init stop";
|
||||
};
|
||||
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
|
||||
tlp-sleep = {
|
||||
@ -92,8 +90,6 @@ in
|
||||
ExecStart = "${tlp}/bin/tlp suspend";
|
||||
ExecStop = "${tlp}/bin/tlp resume";
|
||||
};
|
||||
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@ let
|
||||
# Fix some paths in the standard udev rules. Hacky.
|
||||
for i in $out/*.rules; do
|
||||
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/blkid \"${pkgs.utillinux}/sbin/blkid \
|
||||
--replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \
|
||||
@ -316,8 +316,7 @@ in
|
||||
'';
|
||||
|
||||
systemd.services.systemd-udevd =
|
||||
{ environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
|
||||
restartTriggers = cfg.packages;
|
||||
{ restartTriggers = cfg.packages;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -121,7 +121,7 @@ let
|
||||
makeWrapper ${cfg.packages.gitlab.env}/bin/bundle $out/bin/gitlab-bundle \
|
||||
${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \
|
||||
--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' \
|
||||
--run 'cd ${cfg.packages.gitlab}/share/gitlab'
|
||||
makeWrapper $out/bin/gitlab-bundle $out/bin/gitlab-rake \
|
||||
|
@ -248,7 +248,7 @@ in
|
||||
description = ''
|
||||
List of binary cache URLs that non-root users can use (in
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
@ -390,7 +390,7 @@ in {
|
||||
after = [ "network-interfaces.target" ];
|
||||
environment = carbonEnv;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PermissionsStartOnly = true;
|
||||
@ -413,7 +413,7 @@ in {
|
||||
after = [ "network-interfaces.target" ];
|
||||
environment = carbonEnv;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PIDFile="/run/${name}/${name}.pid";
|
||||
@ -429,7 +429,7 @@ in {
|
||||
after = [ "network-interfaces.target" ];
|
||||
environment = carbonEnv;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PIDFile="/run/${name}/${name}.pid";
|
||||
@ -461,11 +461,11 @@ in {
|
||||
penvPack = "${penv}/${pkgs.python.sitePackages}";
|
||||
# opt/graphite/webapp contains graphite/settings.py
|
||||
# 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";
|
||||
GRAPHITE_CONF_DIR = configDir;
|
||||
GRAPHITE_STORAGE_DIR = dataDir;
|
||||
LD_LIBRARY_PATH = "${pkgs.cairo}/lib";
|
||||
LD_LIBRARY_PATH = "${pkgs.cairo.out}/lib";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
|
@ -80,7 +80,7 @@ in
|
||||
preStart = ''
|
||||
mkdir -p -m 0755 /afs
|
||||
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}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
|
||||
'';
|
||||
|
@ -5,7 +5,7 @@ with lib;
|
||||
let
|
||||
|
||||
cfg = config.networking.fan;
|
||||
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
|
||||
modprobe = "${pkgs.kmod}/bin/modprobe";
|
||||
|
||||
in
|
||||
|
||||
|
32
nixos/modules/services/networking/gdomap.nix
Normal file
32
nixos/modules/services/networking/gdomap.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
@ -118,7 +118,7 @@ in
|
||||
systemd.services.strongswan = {
|
||||
description = "strongSwan IPSec Service";
|
||||
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" ];
|
||||
after = [ "network.target" "keys.target" ];
|
||||
environment = {
|
||||
|
@ -133,7 +133,7 @@ in
|
||||
@{PROC}/sys/kernel/random/uuid r,
|
||||
@{PROC}/sys/vm/overcommit_memory r,
|
||||
|
||||
${pkgs.openssl}/etc/** r,
|
||||
${pkgs.openssl.out}/etc/** r,
|
||||
${pkgs.transmission}/share/transmission/** r,
|
||||
|
||||
owner ${settingsDir}/** rw,
|
||||
|
@ -37,7 +37,7 @@ in
|
||||
type = types.str;
|
||||
example = "https://chat.example.com";
|
||||
description = ''
|
||||
URL this Mattermost instance is reachable under, without trailing slash."
|
||||
URL this Mattermost instance is reachable under, without trailing slash.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -169,7 +169,7 @@ in
|
||||
++ lib.optional config.networking.networkmanager.enable kde5.plasma-nm
|
||||
++ lib.optional config.hardware.pulseaudio.enable kde5.plasma-pa
|
||||
++ 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 ];
|
||||
|
||||
environment.pathsToLink = [ "/share" ];
|
||||
|
@ -134,8 +134,9 @@ let
|
||||
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
|
||||
esac
|
||||
|
||||
# FIXME: gdbus should not be in glib.dev!
|
||||
${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 \
|
||||
--method org.freedesktop.DBus.UpdateActivationEnvironment \
|
||||
"{$(env | ${pkgs.gnused}/bin/sed "s/'/\\\\'/g; s/\([^=]*\)=\(.*\)/'\1':'\2'/" \
|
||||
|
@ -20,9 +20,9 @@ in
|
||||
services.xserver.windowManager.session = singleton
|
||||
{ name = "metacity";
|
||||
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.
|
||||
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 # */
|
||||
${gnome.metacity}/bin/metacity &
|
||||
waitPID=$!
|
||||
|
@ -93,6 +93,10 @@ in
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
|
||||
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 = ''
|
||||
@ -108,9 +112,9 @@ in
|
||||
touch /var/log/lastlog
|
||||
|
||||
mkdir -p /etc/dropbear
|
||||
${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"}
|
||||
${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"}
|
||||
${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_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 $extraUtils/etc/dropbear/dropbear_dss_host_key /etc/dropbear/dropbear_dss_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
|
||||
${concatStrings (map (key: ''
|
||||
|
@ -228,7 +228,6 @@ in
|
||||
systemd.services."systemd-modules-load" =
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ kernelModulesConf ];
|
||||
environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
|
||||
serviceConfig =
|
||||
{ # Ignore failed module loads. Typically some of the
|
||||
# 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 = {
|
||||
isYes = option: {
|
||||
assertion = config: config.isYes option;
|
||||
|
@ -508,7 +508,11 @@ my $nameDiffer = get("fullName") ne $prevGrubState->name;
|
||||
my $versionDiffer = get("fullVersion") ne $prevGrubState->version;
|
||||
my $efiDiffer = $efiTarget ne $prevGrubState->efi;
|
||||
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
|
||||
my $tmpDir = File::Temp::tempdir(CLEANUP => 1) or die "Failed to create temporary space";
|
||||
|
@ -7,6 +7,7 @@ import subprocess
|
||||
import glob
|
||||
import tempfile
|
||||
import errno
|
||||
import warnings
|
||||
|
||||
def copy_if_not_exists(source, 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')
|
||||
args = parser.parse_args()
|
||||
|
||||
# We deserve our own env var!
|
||||
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":
|
||||
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"])
|
||||
else:
|
||||
|
@ -8,41 +8,6 @@ with lib;
|
||||
|
||||
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 {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
@ -87,7 +52,7 @@ with lib;
|
||||
'';
|
||||
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 =
|
||||
''
|
||||
@ -95,11 +60,9 @@ with lib;
|
||||
# in the right location in the Nix store for kernel modules).
|
||||
# We need this when the kernel (or some module) auto-loads a
|
||||
# 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";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -312,8 +312,50 @@ mountFS() {
|
||||
echo "retrying..."
|
||||
n=$((n + 1))
|
||||
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.
|
||||
waitDevice() {
|
||||
|
@ -131,9 +131,16 @@ let
|
||||
# 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
|
||||
# mounting /, like / on a loopback).
|
||||
fileSystems = filter
|
||||
(fs: fs.neededForBoot || elem fs.mountPoint [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ])
|
||||
(attrValues config.fileSystems);
|
||||
#
|
||||
# We need to guarantee that / is the first filesystem in the list so
|
||||
# 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 {
|
||||
|
@ -207,6 +207,5 @@ exec {logOutFd}>&- {logErrFd}>&-
|
||||
# Start systemd.
|
||||
echo "starting 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 \
|
||||
exec systemd
|
||||
|
@ -38,7 +38,7 @@ in
|
||||
description = "CPU Frequency Governor Setup";
|
||||
after = [ "systemd-modules-load.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ cpupower config.system.sbin.modprobe ];
|
||||
path = [ cpupower pkgs.kmod ];
|
||||
unitConfig.ConditionVirtualization = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
@ -11,14 +11,14 @@ in
|
||||
{
|
||||
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
|
||||
[ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ];
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
};
|
||||
|
@ -247,8 +247,18 @@ in
|
||||
esac
|
||||
done
|
||||
''] ++ (map (pool: ''
|
||||
echo "importing root ZFS pool \"${pool}\"..."
|
||||
zpool import -d ${cfgZfs.devNodes} -N $ZFS_FORCE "${pool}"
|
||||
echo -n "importing root ZFS pool \"${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));
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@ in
|
||||
|
||||
postVM =
|
||||
''
|
||||
PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
|
||||
PATH=$PATH:${stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
|
||||
pushd $out
|
||||
${pkgs.qemu_kvm}/bin/qemu-img convert -c -O qcow2 $diskImageBase nixos.qcow2
|
||||
rm $diskImageBase
|
||||
|
@ -95,8 +95,7 @@ in
|
||||
LimitNPROC = 1048576;
|
||||
} // proxy_env;
|
||||
|
||||
path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
|
||||
environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
|
||||
path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
|
||||
|
||||
postStart = if cfg.socketActivation then "" else cfg.postStart;
|
||||
|
||||
|
@ -23,7 +23,7 @@ in
|
||||
|
||||
postVM =
|
||||
''
|
||||
PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
|
||||
PATH=$PATH:${stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
|
||||
pushd $out
|
||||
mv $diskImageBase disk.raw
|
||||
tar -Szcf $diskImageBase.tar.gz disk.raw
|
||||
|
@ -135,13 +135,13 @@ let
|
||||
}
|
||||
''
|
||||
# Create a /boot EFI partition with 40M
|
||||
${pkgs.gptfdisk}/sbin/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}/sbin/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}/sbin/sgdisk -A 2:set:2 /dev/vda
|
||||
${pkgs.gptfdisk}/sbin/sgdisk -h 2 /dev/vda
|
||||
${pkgs.gptfdisk}/sbin/sgdisk -C /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda
|
||||
${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda
|
||||
${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
|
||||
. /sys/class/block/vda2/uevent
|
||||
mknod /dev/vda2 b $MAJOR $MINOR
|
||||
@ -151,11 +151,11 @@ let
|
||||
${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot
|
||||
|
||||
# Mount /boot; load necessary modules first.
|
||||
${pkgs.kmod}/sbin/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}/sbin/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}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
|
||||
${pkgs.kmod}/bin/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_iso8859-1.ko.xz || true
|
||||
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
|
||||
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
|
||||
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
|
||||
mkdir /boot
|
||||
mount /dev/vda2 /boot
|
||||
|
||||
@ -370,7 +370,7 @@ in
|
||||
boot.initrd.extraUtilsCommands =
|
||||
''
|
||||
# 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 =
|
||||
|
@ -68,6 +68,7 @@ in rec {
|
||||
(all nixos.tests.boot.uefiCdrom)
|
||||
(all nixos.tests.boot.uefiUsb)
|
||||
(all nixos.tests.boot-stage1)
|
||||
(all nixos.tests.hibernate)
|
||||
(all nixos.tests.ecryptfs)
|
||||
(all nixos.tests.ipv6)
|
||||
(all nixos.tests.i3wm)
|
||||
|
@ -4,12 +4,12 @@ with import ../lib/testing.nix { inherit system; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
testVMConfig = vmName: attrs: { config, pkgs, ... }: let
|
||||
testVMConfig = vmName: attrs: { config, pkgs, lib, ... }: let
|
||||
guestAdditions = pkgs.linuxPackages.virtualboxGuestAdditions;
|
||||
|
||||
miniInit = ''
|
||||
#!${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
|
||||
cat > /etc/passwd <<EOF
|
||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
postFixup = ''
|
||||
for executable in $(cd $out/bin && ls); do
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchsvn, pkgconfig, autoreconfHook, gnutls33, freetype
|
||||
, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, libjack2, libvorbis
|
||||
, libsndfile, libogg
|
||||
, libSM, libsndfile, libogg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@ -14,7 +14,7 @@ stdenv.mkDerivation {
|
||||
|
||||
buildInputs = [
|
||||
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 ];
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ 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
|
||||
}:
|
||||
|
||||
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
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
|
||||
];
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
name = "mopidy-${version}";
|
||||
|
||||
version = "2.0.0";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mopidy";
|
||||
repo = "mopidy";
|
||||
rev = "v${version}";
|
||||
sha256 = "06f1y87dqc7p6kq5npmg3ki8x4iacyjzd7nq7188x20y2zglrjbm";
|
||||
sha256 = "15i17rj2bh2kda6d6rwcjhs2m3nfsrcyq3lj9vbgmacg0cdb22pp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
|
||||
name = "areca-7.5";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
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#^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/
|
||||
substituteInPlace bin/areca_run.sh --replace '[ "$JAVA_IMPL" = "java" ]' \
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
|
||||
libCairo=$out/eclipse/libcairo-swt.so
|
||||
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
|
||||
# settings in ~/.eclipse/org.eclipse.platform_<version> rather
|
||||
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
|
||||
--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"
|
||||
|
||||
# Create desktop item.
|
||||
|
@ -66,8 +66,9 @@ stdenv.mkDerivation rec {
|
||||
else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
|
||||
"--with-gif=no" "--with-tiff=no" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX)
|
||||
"-I${cairo.dev}/include/cairo";
|
||||
NIX_CFLAGS_COMPILE =
|
||||
[ "-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 = ''
|
||||
mkdir -p $out/share/emacs/site-lisp/
|
||||
|
@ -25,13 +25,13 @@ let
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emacs-25.1-rc1";
|
||||
name = "emacs-25.1-rc2";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://alpha.gnu.org/gnu/emacs/pretest/${name}.tar.xz";
|
||||
sha256 = "0cv1hars9zxlv040h7f3zz50fhn67dqa18ms4hg9sdblckk50360";
|
||||
sha256 = "1hffvyvl50mrivdv6lp92sbxi3l2zhblj8npmpbzk47zpl1mzm2v";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
||||
version = "2.1.0";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
|
||||
item=${desktopItem}
|
||||
|
||||
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 ${hiName}_JDK "$jdk" \
|
||||
--set ANDROID_JAVA_HOME "$jdk" \
|
||||
|
@ -24,12 +24,12 @@ let
|
||||
unwrapped =
|
||||
kdeDerivation rec {
|
||||
name = "kile-${version}";
|
||||
version = "2016-07-02";
|
||||
version = "2016-07-25";
|
||||
|
||||
src = fetchgit {
|
||||
url = git://anongit.kde.org/kile.git;
|
||||
rev = "d38bc7069667119cc891b351188484ca6fb88973";
|
||||
sha256 = "1nha71i16fs7nq2812b5565nbmbsbs3ak5czas6xg1dg5bsvdqh8";
|
||||
rev = "9cad4757df2493a6099b89114340493c6b436d0b";
|
||||
sha256 = "0kikrkssfd7bj580iwsipirbz2klxvk0f7nfg5y9mkv0pnchx2mj";
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,28 +1,65 @@
|
||||
{ stdenv, pythonPackages, fetchgit }:
|
||||
{ stdenv, python3Packages, fetchFromGitHub, makeWrapper, makeDesktopItem }:
|
||||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "leo-editor-${version}";
|
||||
namePrefix = "";
|
||||
version = "5.1";
|
||||
version = "5.3";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/leo-editor/leo-editor";
|
||||
rev = "refs/tags/Leo-${version}-final";
|
||||
sha256 = "0km5mvzfpfbxxhcjr4if24qhgk2c7dsvmfinz0zrbfriip848vcp";
|
||||
src = fetchFromGitHub {
|
||||
owner = "leo-editor";
|
||||
repo = "leo-editor";
|
||||
rev = version;
|
||||
sha256 = "0whbay8ilabzpxdjaxv447y6bqbsilx161fv7wa15v3qqm2kapsp";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [ pyqt4 sqlite3 ];
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ makeWrapper python3Packages.python ];
|
||||
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
|
||||
|
||||
patchPhase = ''
|
||||
rm setup.cfg
|
||||
desktopItem = makeDesktopItem rec {
|
||||
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";
|
||||
description = "A powerful folding editor";
|
||||
longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ leonardoce ];
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ leonardoce ramkromberg ];
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
wrapProgram $out/bin/tuxguitar \
|
||||
--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"
|
||||
'';
|
||||
|
||||
|
@ -26,6 +26,15 @@ stdenv.mkDerivation rec {
|
||||
${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 ''
|
||||
substituteInPlace src/text.c --replace "__time_t" "time_t"
|
||||
'';
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/bin
|
||||
cp -a netbeans $out
|
||||
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} \
|
||||
--add-flags "--jdkhome ${jdk.home}"
|
||||
|
||||
|
@ -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 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "145zxgaky5bcq5bxm4z7h0pvviq7k1nrgnf40q6nax6ik616ybjq";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig vala which autoconf automake
|
||||
buildInputs = [ pkgconfig vala_0_26 which autoconf automake
|
||||
libtool glib gtk3 libwnck3 asciidoc
|
||||
gnome3.gtksourceview gnome3.vte_290 python3Packages.pygments ];
|
||||
|
||||
|
33
pkgs/applications/graphics/ao/default.nix
Normal file
33
pkgs/applications/graphics/ao/default.nix
Normal 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;
|
||||
};
|
||||
}
|
5
pkgs/applications/graphics/ao/src.json
Normal file
5
pkgs/applications/graphics/ao/src.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"url": "https://github.com/mkeeter/ao",
|
||||
"rev": "69fadb81543cc9031e4a7ec2036c7f2ab505a620",
|
||||
"sha256": "1717k72vr0i5j7bvxmd6q16fpvkljnqfa1hr3i4yq8cjdsj69my7"
|
||||
}
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
# Allow geeqie to find exiv2 and exiftran, necessary to
|
||||
# losslessly rotate JPEG images.
|
||||
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; {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ 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 {
|
||||
name = "giv-20150811-git";
|
||||
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
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 ];
|
||||
|
||||
meta = {
|
||||
|
31
pkgs/applications/graphics/gthumb/default.nix
Normal file
31
pkgs/applications/graphics/gthumb/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/bin
|
||||
cp -r linux/work/* $out/${name}/
|
||||
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
|
||||
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
|
||||
ln -s ${jdk} $out/${name}/java
|
||||
'';
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"EXIV2PATH=${exiv2}/include/exiv2"
|
||||
"EXIV2PATH=${exiv2.dev}/include/exiv2"
|
||||
"OPENEXRDIR=${openexr}/include/OpenEXR"
|
||||
"FFTW3DIR=${fftwSinglePrec.dev}/include"
|
||||
"LIBTIFFDIR=${libtiff.dev}/include"
|
||||
|
@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
|
||||
patchPhase = ''
|
||||
${myPatchElf "opt/brother/scanner/brscan4/brsaneconfig4"}
|
||||
|
||||
RPATH=${libusb}/lib
|
||||
RPATH=${libusb.out}/lib
|
||||
for a in usr/lib64/sane/*.so*; do
|
||||
if ! test -L $a; then
|
||||
patchelf --set-rpath $RPATH $a
|
||||
|
@ -55,7 +55,7 @@ stdenv.mkDerivation {
|
||||
--replace "RUN+=\"/bin/sh" "RUN+=\"${stdenv.shell}"
|
||||
|
||||
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);
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -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
|
||||
, 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 }:
|
||||
|
||||
# for dependencies see http://www.yorba.org/projects/shotwell/install/
|
||||
@ -8,12 +8,12 @@
|
||||
stdenv.mkDerivation rec {
|
||||
version = "${major}.${minor}";
|
||||
major = "0.23";
|
||||
minor = "4";
|
||||
minor = "5";
|
||||
name = "shotwell-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
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";
|
||||
@ -24,19 +24,11 @@ stdenv.mkDerivation rec {
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
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
|
||||
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala_0_28 sqlite webkitgtk
|
||||
pkgconfig gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee
|
||||
which udev libgudev gnome3.gexiv2 hicolor_icon_theme
|
||||
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 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ 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 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [ cairo colord glib gusb gtk3 libusb1 libxml2 sane-backends
|
||||
vala ];
|
||||
vala_0_23 ];
|
||||
nativeBuildInputs = [ intltool itstool pkgconfig wrapGAppsHook ];
|
||||
|
||||
configureFlags = [ "--disable-packagekit" ];
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl
|
||||
, ghostscript, atk, gtk, glib, fontconfig, freetype
|
||||
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
||||
, pango, libX11, xproto, zlib, poppler, poppler_data
|
||||
, pango, libX11, xproto, zlib, poppler
|
||||
, autoconf, automake, libtool, pkgconfig}:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.4.8";
|
||||
@ -14,12 +14,12 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
ghostscript atk gtk glib fontconfig freetype
|
||||
libgnomecanvas libgnomeprint libgnomeprintui
|
||||
pango libX11 xproto zlib poppler poppler_data
|
||||
pango libX11 xproto zlib poppler
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
|
||||
|
||||
NIX_LDFLAGS="-lX11 -lz";
|
||||
NIX_LDFLAGS = [ "-lX11" "-lz" ];
|
||||
|
||||
meta = {
|
||||
homepage = http://xournal.sourceforge.net/;
|
||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
ln -s $out/{nix-support,bin}/wavesurfer.tcl
|
||||
wrapProgram "$out/nix-support/wavesurfer.tcl" \
|
||||
--set TCLLIBPATH "${snack}/lib" \
|
||||
--prefix PATH : "${tcl}/bin:${tk}/bin"
|
||||
--prefix PATH : "${stdenv.lib.makeBinPath [ tcl tk ]}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk mono]}"
|
||||
# We need PATH from user env for xdg-open to find its tools, which
|
||||
# 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
|
||||
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchurl, SDL, boost, cmake, ffmpeg, gettext, glew
|
||||
, ilmbase, libXi, libjpeg, libpng, libsamplerate, libsndfile
|
||||
{ stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
|
||||
, ilmbase, libXi, libX11, libjpeg, libpng, libsamplerate, libsndfile
|
||||
, libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg, python
|
||||
, zlib, fftw, opensubdiv
|
||||
, zlib, fftw, opensubdiv, freetype
|
||||
, jackaudioSupport ? false, libjack2
|
||||
, cudaSupport ? false, cudatoolkit
|
||||
, colladaSupport ? true, opencollada
|
||||
@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
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
|
||||
opencolorio openexr openimageio /* openjpeg */ python zlib fftw
|
||||
opencolorio openexr openimageio openjpeg python zlib fftw
|
||||
(opensubdiv.override { inherit cudaSupport; })
|
||||
]
|
||||
++ optional jackaudioSupport libjack2
|
||||
@ -41,12 +41,15 @@ stdenv.mkDerivation rec {
|
||||
"-DWITH_SDL=ON"
|
||||
"-DWITH_GAMEENGINE=ON"
|
||||
"-DWITH_OPENCOLORIO=ON"
|
||||
"-DWITH_SYSTEM_OPENJPEG=ON"
|
||||
"-DWITH_PLAYER=ON"
|
||||
"-DWITH_OPENSUBDIV=ON"
|
||||
"-DPYTHON_LIBRARY=python${python.majorVersion}m"
|
||||
"-DPYTHON_LIBPATH=${python}/lib"
|
||||
"-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
|
||||
"-DPYTHON_VERSION=${python.majorVersion}"
|
||||
"-DWITH_PYTHON_INSTALL=OFF"
|
||||
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
|
||||
]
|
||||
++ optional jackaudioSupport "-DWITH_JACK=ON"
|
||||
++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"
|
||||
|
@ -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
|
||||
, makeWrapper, unrarSupport ? false, chmlib, pythonPackages, xz, libusb1, libmtp
|
||||
, xdg_utils, makeDesktopItem
|
||||
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
|
||||
|
||||
prePatch = ''
|
||||
sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':" \
|
||||
sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip/PyQt5':" \
|
||||
setup/build_environment.py
|
||||
'';
|
||||
|
||||
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig qmakeHook ];
|
||||
|
||||
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
|
||||
pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil
|
||||
pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow
|
||||
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
export FC_LIB_DIR=${fontconfig.lib}/lib
|
||||
export PODOFO_INC_DIR=${podofo}/include/podofo
|
||||
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
|
||||
|
||||
PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py
|
||||
|
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||
cp ding.png $out/share/pixmaps/
|
||||
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; {
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emem";
|
||||
version = "0.2.24";
|
||||
version = "0.2.27";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
inherit jdk;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar";
|
||||
sha256 = "0h20vpd4gkg1m5mn3fkgrmjgf9w640b7w2500nn0pswmvqawrhpi";
|
||||
sha256 = "0zmh152dfgsq2yj14wb3504pyibq4r671q5yz6yy28ihym7qr0fd";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ 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
|
||||
, libxkbcommon, xorg, udev
|
||||
, bashInteractive
|
||||
@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
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
|
||||
xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence
|
||||
libxkbcommon
|
||||
@ -41,7 +41,7 @@ stdenv.mkDerivation {
|
||||
wrapProgram "$out/bin/finalterm" \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
||||
--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; {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, automake, autoconf, libtool,
|
||||
pkgconfig, file, intltool, libxml2, json_glib , sqlite, itstool,
|
||||
vala, gnome3, wrapGAppsHook
|
||||
vala_0_32, gnome3, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
automake autoconf libtool
|
||||
file
|
||||
intltool
|
||||
vala
|
||||
vala_0_32
|
||||
gnome3.yelp_tools
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
version = "1.33.0";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ buildPerlPackage {
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
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
|
||||
'';
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
{ stdenv, fetchurl, makeWrapper, pkgconfig, zip, python
|
||||
, zlib, xapian, which , icu, libmicrohttpd , lzma, zimlib
|
||||
, ctpp2, aria2, wget , bc, libuuid , glibc, libX11
|
||||
, libXext, libXt, libXrender , glib, dbus, dbus_glib, gtk
|
||||
, gdk_pixbuf, pango, cairo , freetype, fontconfig, alsaLib
|
||||
, atk
|
||||
{ stdenv, callPackage, overrideCC, fetchurl, makeWrapper, pkgconfig
|
||||
, zip, python, zlib, which, icu, libmicrohttpd, lzma, ctpp2, aria2, wget, bc
|
||||
, libuuid, glibc, libX11, libXext, libXt, libXrender, glib, dbus, dbus_glib
|
||||
, gtk, gdk_pixbuf, pango, cairo , freetype, fontconfig, alsaLib, atk
|
||||
}:
|
||||
|
||||
let
|
||||
@ -31,6 +29,9 @@ let
|
||||
sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg";
|
||||
};
|
||||
|
||||
xapian = callPackage ../../../development/libraries/xapian { inherit stdenv; };
|
||||
zimlib = callPackage ../../../development/libraries/zimlib { inherit stdenv; };
|
||||
|
||||
in
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
@ -97,7 +98,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
rm $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
|
||||
'';
|
||||
|
||||
@ -106,6 +107,5 @@ stdenv.mkDerivation rec {
|
||||
homepage = http://kiwix.org;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ robbinch ];
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
|
||||
dontStrip = true;
|
||||
|
||||
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+-L\$srcdir/mupdf/build/native ++' build.sh
|
||||
'';
|
||||
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
||||
version = "3.3.8";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
|
@ -18,17 +18,32 @@ stdenv.mkDerivation rec {
|
||||
url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958";
|
||||
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" ];
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
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 = ''
|
||||
make install prefix=$out
|
||||
gcc -shared -o $out/lib/libmupdf.so.${version} -Wl,--whole-archive $out/lib/libmupdf.a -Wl,--no-whole-archive
|
||||
preConfigure = ''
|
||||
# Don't remove mujs because upstream version is incompatible
|
||||
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"
|
||||
cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
|
||||
@ -38,23 +53,24 @@ stdenv.mkDerivation rec {
|
||||
|
||||
Name: mupdf
|
||||
Description: Library for rendering PDF documents
|
||||
Requires: freetype2 libopenjp2 libcrypto
|
||||
Version: ${version}
|
||||
Libs: -L$out/lib -lmupdf
|
||||
Libs: -L$out/lib -lmupdf -lmupdfthird
|
||||
Cflags: -I$out/include
|
||||
EOF
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
cat > $out/share/applications/mupdf.desktop <<EOF
|
||||
moveToOutput "bin" "$bin"
|
||||
mkdir -p $bin/share/applications
|
||||
cat > $bin/share/applications/mupdf.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=mupdf
|
||||
Comment=PDF viewer
|
||||
Exec=$out/bin/mupdf-x11 %f
|
||||
Exec=$bin/bin/mupdf-x11 %f
|
||||
Terminal=false
|
||||
EOF
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -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 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
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 ];
|
||||
|
||||
postInstall = ''
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [
|
||||
"--with-libxml2=${libxml2}"
|
||||
"--with-libxslt=${libxslt}"
|
||||
"--with-libxslt=${libxslt.dev}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user