···469 mkBefore = mkOrder 500;
470 mkAfter = mkOrder 1500;
4710472 # Convenient property used to transfer all definitions and their
473 # properties from one option to another. This property is useful for
474 # renaming options, and also for including properties from another module
···497498 /* Compatibility. */
499 fixMergeModules = modules: args: evalModules { inherit modules args; check = false; };
0000000000000000000000000000000000000000000000000000000000000000500501}
···469 mkBefore = mkOrder 500;
470 mkAfter = mkOrder 1500;
471472+473 # Convenient property used to transfer all definitions and their
474 # properties from one option to another. This property is useful for
475 # renaming options, and also for including properties from another module
···498499 /* Compatibility. */
500 fixMergeModules = modules: args: evalModules { inherit modules args; check = false; };
501+502+503+ /* Return a module that causes a warning to be shown if the
504+ specified option is defined. For example,
505+506+ mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ]
507+508+ causes a warning if the user defines boot.loader.grub.bootDevice.
509+ */
510+ mkRemovedOptionModule = optionName:
511+ { options, ... }:
512+ { options = setAttrByPath optionName (mkOption {
513+ visible = false;
514+ });
515+ config.warnings =
516+ let opt = getAttrFromPath optionName options; in
517+ optional opt.isDefined
518+ "The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.";
519+ };
520+521+ /* Return a module that causes a warning to be shown if the
522+ specified "from" option is defined; the defined value is however
523+ forwarded to the "to" option. This can be used to rename options
524+ while providing backward compatibility. For example,
525+526+ mkRenamedOptionModule [ "boot" "copyKernels" ] [ "boot" "loader" "grub" "copyKernels" ]
527+528+ forwards any definitions of boot.copyKernels to
529+ boot.loader.grub.copyKernels while printing a warning.
530+ */
531+ mkRenamedOptionModule = from: to: doRename {
532+ inherit from to;
533+ visible = false;
534+ warn = true;
535+ use = builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.";
536+ };
537+538+ /* Like ‘mkRenamedOptionModule’, but doesn't show a warning. */
539+ mkAliasOptionModule = from: to: doRename {
540+ inherit from to;
541+ visible = true;
542+ warn = false;
543+ use = id;
544+ };
545+546+ doRename = { from, to, visible, warn, use }:
547+ let
548+ toOf = attrByPath to
549+ (abort "Renaming error: option `${showOption to}' does not exists.");
550+ in
551+ { config, options, ... }:
552+ { options = setAttrByPath from (mkOption {
553+ description = "Alias of <option>${showOption to}</option>.";
554+ apply = x: use (toOf config);
555+ });
556+ config = {
557+ /*
558+ warnings =
559+ let opt = getAttrFromPath from options; in
560+ optional (warn && opt.isDefined)
561+ "The option `${showOption from}' defined in ${showFiles opt.files} has been renamed to `${showOption to}'.";
562+ */
563+ } // setAttrByPath to (mkAliasDefinitions (getAttrFromPath from options));
564+ };
565566}
···152 push @kernelModules, "wl";
153 }
1540000000000000000155 # Can't rely on $module here, since the module may not be loaded
156 # due to missing firmware. Ideally we would check modules.pcimap
157 # here.
···152 push @kernelModules, "wl";
153 }
154155+ # broadcom FullMac driver
156+ # list taken from
157+ # https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211#brcmfmac
158+ if ($vendor eq "0x14e4" &&
159+ ($device eq "0x43a3" || $device eq "0x43df" || $device eq "0x43ec" ||
160+ $device eq "0x43d3" || $device eq "0x43d9" || $device eq "0x43e9" ||
161+ $device eq "0x43ba" || $device eq "0x43bb" || $device eq "0x43bc" ||
162+ $device eq "0xaa52" || $device eq "0x43ca" || $device eq "0x43cb" ||
163+ $device eq "0x43cc" || $device eq "0x43c3" || $device eq "0x43c4" ||
164+ $device eq "0x43c5"
165+ ) )
166+ {
167+ # we need e.g. brcmfmac43602-pcie.bin
168+ push @imports, "<nixos/modules/hardware/network/broadcom-43xx.nix>";
169+ }
170+171 # Can't rely on $module here, since the module may not be loaded
172 # due to missing firmware. Ideally we would check modules.pcimap
173 # here.
···1+{ stdenv, fetchurl, unzip }:
2+3+stdenv.mkDerivation rec {
4+ name = "paratype-pt-mono";
5+6+ src = fetchurl rec {
7+ url = "http://www.paratype.ru/uni/public/PTMono.zip";
8+ sha256 = "1wqaai7d6xh552vvr5svch07kjn1q89ab5jimi2z0sbd0rbi86vl";
9+ };
10+11+ buildInputs = [unzip];
12+13+ phases = "unpackPhase installPhase";
14+ sourceRoot = ".";
15+16+ installPhase = ''
17+ mkdir -p $out/share/fonts/truetype
18+ mkdir -p $out/share/doc/paratype
19+ cp *.ttf $out/share/fonts/truetype
20+ cp *.txt $out/share/doc/paratype
21+ '';
22+23+ meta = with stdenv.lib; {
24+ homepage = "http://www.paratype.ru/public/";
25+ description = "An open Paratype font";
26+27+ license = "Open Paratype license";
28+ # no commercial distribution of the font on its own
29+ # must rename on modification
30+ # http://www.paratype.ru/public/pt_openlicense.asp
31+32+ platforms = platforms.all;
33+ maintainers = with maintainers; [ raskin ];
34+ };
35+}
36+
+36
pkgs/data/fonts/paratype-pt/sans.nix
···000000000000000000000000000000000000
···1+{ stdenv, fetchurl, unzip }:
2+3+stdenv.mkDerivation rec {
4+ name = "paratype-pt-sane";
5+6+ src = fetchurl rec {
7+ url = "http://www.paratype.ru/uni/public/PTSans.zip";
8+ sha256 = "1j9gkbqyhxx8pih5agr9nl8vbpsfr9vdqmhx73ji3isahqm3bhv5";
9+ };
10+11+ buildInputs = [unzip];
12+13+ phases = "unpackPhase installPhase";
14+ sourceRoot = ".";
15+16+ installPhase = ''
17+ mkdir -p $out/share/fonts/truetype
18+ mkdir -p $out/share/doc/paratype
19+ cp *.ttf $out/share/fonts/truetype
20+ cp *.txt $out/share/doc/paratype
21+ '';
22+23+ meta = with stdenv.lib; {
24+ homepage = "http://www.paratype.ru/public/";
25+ description = "An open Paratype font";
26+27+ license = "Open Paratype license";
28+ # no commercial distribution of the font on its own
29+ # must rename on modification
30+ # http://www.paratype.ru/public/pt_openlicense.asp
31+32+ platforms = platforms.all;
33+ maintainers = with maintainers; [ raskin ];
34+ };
35+}
36+
+36
pkgs/data/fonts/paratype-pt/serif.nix
···000000000000000000000000000000000000
···1+{ stdenv, fetchurl, unzip }:
2+3+stdenv.mkDerivation rec {
4+ name = "paratype-pt-serif";
5+6+ src = fetchurl rec {
7+ url = "http://www.paratype.ru/uni/public/PTSerif.zip";
8+ sha256 = "0x3l58c1rvwmh83bmmgqwwbw9av1mvvq68sw2hdkyyihjvamyvvs";
9+ };
10+11+ buildInputs = [unzip];
12+13+ phases = "unpackPhase installPhase";
14+ sourceRoot = ".";
15+16+ installPhase = ''
17+ mkdir -p $out/share/fonts/truetype
18+ mkdir -p $out/share/doc/paratype
19+ cp *.ttf $out/share/fonts/truetype
20+ cp *.txt $out/share/doc/paratype
21+ '';
22+23+ meta = with stdenv.lib; {
24+ homepage = "http://www.paratype.ru/public/";
25+ description = "An open Paratype font";
26+27+ license = "Open Paratype license";
28+ # no commercial distribution of the font on its own
29+ # must rename on modification
30+ # http://www.paratype.ru/public/pt_openlicense.asp
31+32+ platforms = platforms.all;
33+ maintainers = with maintainers; [ raskin ];
34+ };
35+}
36+
+3-3
pkgs/data/misc/geolite-legacy/default.nix
···89 # Annoyingly, these files are updated without a change in URL. This means that
10 # builds will start failing every month or so, until the hashes are updated.
11- version = "2015-10-09";
12in
13stdenv.mkDerivation {
14 name = "geolite-legacy-${version}";
···27 "0jdgfcy90mk7q25rhb8ymnddkskmp2cmyzmbjr3ij0zvbbpzxl4i";
28 srcGeoIPASNum = fetchDB
29 "asnum/GeoIPASNum.dat.gz" "GeoIPASNum.dat.gz"
30- "05j2nygvb7xi4s636dik12vgrdi37q5fdv5k3liqgswf9z0msz81";
31 srcGeoIPASNumv6 = fetchDB
32 "asnum/GeoIPASNumv6.dat.gz" "GeoIPASNumv6.dat.gz"
33- "17s7pcqmfd9xvq0hd7g7nh62sjayl24w04ifm39snrq2a32l667n";
3435 meta = with stdenv.lib; {
36 inherit version;
···89 # Annoyingly, these files are updated without a change in URL. This means that
10 # builds will start failing every month or so, until the hashes are updated.
11+ version = "2015-10-13";
12in
13stdenv.mkDerivation {
14 name = "geolite-legacy-${version}";
···27 "0jdgfcy90mk7q25rhb8ymnddkskmp2cmyzmbjr3ij0zvbbpzxl4i";
28 srcGeoIPASNum = fetchDB
29 "asnum/GeoIPASNum.dat.gz" "GeoIPASNum.dat.gz"
30+ "0j73lw2i6nnx1mgp1hspfa95zca5h0hqj12g16rln7pss868wnwi";
31 srcGeoIPASNumv6 = fetchDB
32 "asnum/GeoIPASNumv6.dat.gz" "GeoIPASNumv6.dat.gz"
33+ "1id4rkxp5pppr274y276w2zmx44dn0h44d4ax780g8cbhlc9n2br";
3435 meta = with stdenv.lib; {
36 inherit version;
···1{ stdenv, coreutils, fetchgit, m4, libtool, clang, ghcWithPackages }:
23-let wrappedGhc = ghcWithPackages (hpkgs: with hpkgs; [shuffle hashable mtl network uhc-util uulib] );
4in stdenv.mkDerivation rec {
5 # Important:
6 # The commits "Fixate/tag v..." are the released versions.
7 # Ignore the "bumped version to ...." commits, they do not
8 # correspond to releases.
9- version = "1.1.9.1.20150611";
10 name = "uhc-${version}";
1112 src = fetchgit {
13 url = "https://github.com/UU-ComputerScience/uhc.git";
14- rev = "b80098e07d12900f098ea964b1d2b3f38e5c9900";
15- sha256 = "14qg1fd9pgbczcmn5ggkd9674qadx1izmz8363ps7c207dg94f9x";
16 };
1718 postUnpack = "sourceRoot=\${sourceRoot}/EHC";
···50 # On Darwin, the GNU libtool is used, which does not
51 # support the -static flag and thus breaks the build.
52 platforms = ["x86_64-linux"];
53- broken = true; # https://github.com/UU-ComputerScience/uhc/issues/60
54 };
55}
···1{ stdenv, coreutils, fetchgit, m4, libtool, clang, ghcWithPackages }:
23+let wrappedGhc = ghcWithPackages (hpkgs: with hpkgs; [fgl vector syb uulib network binary hashable uhc-util mtl transformers directory containers array process filepath shuffle uuagc] );
4in stdenv.mkDerivation rec {
5 # Important:
6 # The commits "Fixate/tag v..." are the released versions.
7 # Ignore the "bumped version to ...." commits, they do not
8 # correspond to releases.
9+ version = "1.1.9.1";
10 name = "uhc-${version}";
1112 src = fetchgit {
13 url = "https://github.com/UU-ComputerScience/uhc.git";
14+ rev = "ce93d01486972c994ea2bbbd3d43859911120c39";
15+ sha256 = "1y670sc6ky74l3msayzqjlkjv1kpv3g35pirsq3q79klzvnpyj2x";
16 };
1718 postUnpack = "sourceRoot=\${sourceRoot}/EHC";
···50 # On Darwin, the GNU libtool is used, which does not
51 # support the -static flag and thus breaks the build.
52 platforms = ["x86_64-linux"];
053 };
54}
···53 done
54 ''}
5556- # The android script used SWT and wants to dynamically load some GTK+ stuff.
57- # The following wrapper ensures that they can be found:
058 wrapProgram `pwd`/android \
59 --prefix PATH : ${jdk}/bin \
60 --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
610000000062 # The emulators need additional libraries, which are dynamically loaded => let's wrap them
6364 for i in emulator emulator-arm emulator-mips emulator-x86
···53 done
54 ''}
5556+ # The following scripts used SWT and wants to dynamically load some GTK+ stuff.
57+ # Creating these wrappers ensure that they can be found:
58+59 wrapProgram `pwd`/android \
60 --prefix PATH : ${jdk}/bin \
61 --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
6263+ wrapProgram `pwd`/uiautomatorviewer \
64+ --prefix PATH : ${jdk}/bin \
65+ --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
66+67+ wrapProgram `pwd`/hierarchyviewer \
68+ --prefix PATH : ${jdk}/bin \
69+ --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
70+71 # The emulators need additional libraries, which are dynamically loaded => let's wrap them
7273 for i in emulator emulator-arm emulator-mips emulator-x86
···1-{stdenv, stdenv_32bit, fetchurl, unzip, zlib_32bit}:
23stdenv.mkDerivation rec {
4 version = "23.0.1";
···24 cd android-*
2526 # Patch the interpreter
27- for i in aapt aidl dexdump llvm-rs-cc
28 do
29 patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
30 done
···36 done
3738 # These binaries need to find libstdc++, libgcc_s and libraries in the current folder
39- for i in lib/libbcc.so lib/libbcinfo.so lib/libclang.so llvm-rs-cc
40 do
41 patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:`pwd`/lib $i
42 done
0000000004344 # These binaries also need zlib in addition to libstdc++
45- for i in zipalign
46 do
47 patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
48 patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i
···1+{stdenv, stdenv_32bit, fetchurl, unzip, zlib_32bit, ncurses_32bit}:
23stdenv.mkDerivation rec {
4 version = "23.0.1";
···24 cd android-*
2526 # Patch the interpreter
27+ for i in aapt aidl bcc_compat dexdump llvm-rs-cc
28 do
29 patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
30 done
···36 done
3738 # These binaries need to find libstdc++, libgcc_s and libraries in the current folder
39+ for i in lib/libbcc.so lib/libbcinfo.so lib/libclang.so aidl
40 do
41 patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:`pwd`/lib $i
42 done
43+44+ # Create link to make libtinfo.so.5 work
45+ ln -s ${ncurses_32bit}/lib/libncurses.so.5 `pwd`/lib/libtinfo.so.5
46+47+ # These binaries need to find libstdc++, libgcc_s, ncurses, and libraries in the current folder
48+ for i in bcc_compat llvm-rs-cc
49+ do
50+ patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${ncurses_32bit}/lib:`pwd`/lib $i
51+ done
5253 # These binaries also need zlib in addition to libstdc++
54+ for i in arm-linux-androideabi-ld i686-linux-android-ld mipsel-linux-android-ld split-select zipalign
55 do
56 patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
57 patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i
···54 if system == "armv7l-linux" then stdenvLinux else
55 if system == "mips64el-linux" then stdenvLinux else
56 if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
57- if system == "x86_64-darwin" then stdenvDarwin else
58 if system == "x86_64-solaris" then stdenvNix else
59 if system == "i686-cygwin" then stdenvNative else
60 if system == "x86_64-cygwin" then stdenvNative else
···54 if system == "armv7l-linux" then stdenvLinux else
55 if system == "mips64el-linux" then stdenvLinux else
56 if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
57+ if system == "x86_64-darwin" then stdenvDarwinPure else
58 if system == "x86_64-solaris" then stdenvNix else
59 if system == "i686-cygwin" then stdenvNative else
60 if system == "x86_64-cygwin" then stdenvNative else
+4-2
pkgs/stdenv/pure-darwin/default.nix
···67let
8 # libSystem and its transitive dependencies. Get used to this; it's a recurring theme in darwin land
9- libSystemClosure = [
010 "/usr/lib/libSystem.dylib"
11 "/usr/lib/libSystem.B.dylib"
12 "/usr/lib/libobjc.A.dylib"
···16 "/usr/lib/libc++.1.dylib"
17 "/usr/lib/libDiagnosticMessagesClient.dylib"
18 "/usr/lib/system"
19- ];
02021 fetch = { file, sha256 }: derivation ((import <nix/fetchurl.nix> {
22 url = "https://dl.dropboxusercontent.com/u/2857322/${file}";
···67let
8 # libSystem and its transitive dependencies. Get used to this; it's a recurring theme in darwin land
9+ libSystemClosure = if system == "x86_64-darwin"
10+ then [
11 "/usr/lib/libSystem.dylib"
12 "/usr/lib/libSystem.B.dylib"
13 "/usr/lib/libobjc.A.dylib"
···17 "/usr/lib/libc++.1.dylib"
18 "/usr/lib/libDiagnosticMessagesClient.dylib"
19 "/usr/lib/system"
20+ ]
21+ else [];
2223 fetch = { file, sha256 }: derivation ((import <nix/fetchurl.nix> {
24 url = "https://dl.dropboxusercontent.com/u/2857322/${file}";
+23
pkgs/tools/X11/dex/default.nix
···00000000000000000000000
···1+{ stdenv, fetchFromGitHub, python3 }:
2+3+stdenv.mkDerivation rec {
4+ program = "dex";
5+ name = "${program}-${version}";
6+ version = "0.7";
7+8+ src = fetchFromGitHub {
9+ owner = "jceb";
10+ repo = program;
11+ rev = "v${version}";
12+ sha256 = "041ms01snalapapaniabr92d8iim1qrxian626nharjmp2rd69v5";
13+ };
14+15+ propagatedBuildInputs = [ python3 ];
16+ makeFlags = [ "PREFIX=$(out)" "VERSION=$(version)" ];
17+18+ meta = {
19+ description = "A program to generate and execute DesktopEntry files of the Application type";
20+ homepage = https://github.com/jceb/dex;
21+ platforms = stdenv.lib.platforms.linux;
22+ };
23+}