···4242 # Get a console as soon as the initrd loads fbcon on EFI boot.
4343 boot.initrd.kernelModules = [ "fbcon" ];
44444545+ # Add support for cow filesystems and their utilities
4646+ boot.supportedFilesystems = [ "zfs" "btrfs" ];
4747+4548 # Allow the user to log in as root without a password.
4649 security.initialRootPassword = "";
4750}
···12121313 buildInputs = [ cmake pkgconfig libusb1 ];
14141515- # Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to
1616- # /etc/udev/rules.d/, and there is no option to install elsewhere. So install
1717- # rules manually.
1515+ # TODO: get these fixes upstream:
1616+ # * Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to
1717+ # /etc/udev/rules.d/, and there is no option to install elsewhere. So install
1818+ # rules manually.
1919+ # * Propagate libusb-1.0 dependency in pkg-config file.
1820 postInstall = ''
1921 mkdir -p "$out/etc/udev/rules.d/"
2022 cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules"
2323+2424+ pcfile="$out"/lib/pkgconfig/librtlsdr.pc
2525+ grep -q "Requires:" "$pcfile" && { echo "Upstream has added 'Requires:' in $(basename "$pcfile"); update nix expression."; exit 1; }
2626+ echo "Requires: libusb-1.0" >> "$pcfile"
2127 '';
22282329 meta = with stdenv.lib; {
···2323 '';
24242525 configurePhase = ''
2626- ./configure --prefix=$out --with-contrib-dir=${pkgs.stumpwmContrib}/contrib
2626+ ./configure --prefix=$out --with-contrib-dir=${stumpwmContrib}/contrib
2727 '';
28282929 installPhase = ''
3030 make
3131 make install
3232+ # For some reason, stumpwmContrib is not retained as a runtime
3333+ # dependency (probably because $out/bin/stumpwm is compressed or
3434+ # obfuscated in some way). Thus we add an explicit reference here.
3535+ mkdir $out/nix-support
3636+ echo ${stumpwmContrib} > $out/nix-support/stumpwm-contrib
3237 '';
33383439 meta = with stdenv.lib; {
···11+# Fetches a chicken egg from henrietta using `chicken-install -r'
22+# See: http://wiki.call-cc.org/chicken-projects/egg-index-4.html
33+44+{ stdenv, chicken }:
55+{ name, version, md5 ? "", sha256 ? "" }:
66+77+stdenv.mkDerivation {
88+ name = "chicken-${name}-export";
99+ builder = ./builder.sh;
1010+ buildInputs = [ chicken ];
1111+1212+ outputHashAlgo = if sha256 == "" then "md5" else "sha256";
1313+ outputHashMode = "recursive";
1414+ outputHash = if sha256 == "" then md5 else sha256;
1515+1616+ inherit version;
1717+1818+ eggName = name;
1919+2020+ impureEnvVars = [
2121+ # We borrow these environment variables from the caller to allow
2222+ # easy proxy configuration. This is impure, but a fixed-output
2323+ # derivation like fetchurl is allowed to do so since its result is
2424+ # by definition pure.
2525+ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
2626+ ];
2727+}
2828+
···11+{ stdenv, fetchgit, ocaml, findlib, menhir, which }:
22+33+let inherit (stdenv.lib) getVersion versionAtLeast; in
44+55+assert versionAtLeast (getVersion ocaml) "3.12";
66+77+stdenv.mkDerivation {
88+99+ name = "eff-20140928";
1010+1111+ src = fetchgit {
1212+ url = "https://github.com/matijapretnar/eff.git";
1313+ rev = "90f884a790fddddb51d4d1d3b7c2edf1e8aabb64";
1414+ sha256 = "28e389b35e6959072c245c2e79fe305885b1b2d44ff540a02a097e09e9f9698f";
1515+ };
1616+1717+ buildInputs = [ ocaml findlib menhir which ];
1818+1919+ doCheck = true;
2020+ checkTarget = "test";
2121+2222+ meta = with stdenv.lib; {
2323+ homepage = "http://www.eff-lang.org";
2424+ description = "A functional programming language based on algebraic effects and their handlers";
2525+ longDescription = ''
2626+ Eff is a functional language with handlers of not only exceptions,
2727+ but also of other computational effects such as state or I/O. With
2828+ handlers, you can simply implement transactions, redirections,
2929+ backtracking, multi-threading, and much more...
3030+ '';
3131+ license = licenses.bsd2;
3232+ platforms = ocaml.meta.platforms;
3333+ maintainers = [ maintainers.jirkamarsik ];
3434+ };
3535+}
···135135136136 buildPhase =
137137 ''
138138- # Fake the build environment that setup.py expects.
139139- ln -s ${python}/include/python*/pyconfig.h .
140140- ln -s ${python}/lib/python*/config/Setup Modules/
141141- ln -s ${python}/lib/python*/config/Setup.local Modules/
142142-143138 substituteInPlace setup.py --replace 'self.extensions = extensions' \
144139 'self.extensions = [ext for ext in self.extensions if ext.name in ["${internalName}"]]'
145140
+6
pkgs/development/interpreters/ruby/ruby-1.9.3.nix
···48484949 enableParallelBuilding = true;
50505151+ # Fix a build failure on systems with nix store optimisation.
5252+ # (The build process attempted to copy file a overwriting file b, where a and
5353+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5454+ # https://github.com/NixOS/nixpkgs/issues/4266
5555+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
5656+5157 patches = [
5258 ./ruby19-parallel-install.patch
5359 ./bitperfect-rdoc.patch
+8
pkgs/development/interpreters/ruby/ruby-2.0.0.nix
···55, ncurses, readline, cursesSupport ? false
66, groff, docSupport ? false
77, libyaml, yamlSupport ? true
88+, libffi, fiddleSupport ? true
89, ruby_2_0_0, autoreconfHook, bison, useRailsExpress ? true
910}:
1011···3435 NROFF = "${groff}/bin/nroff";
35363637 buildInputs = ops useRailsExpress [ autoreconfHook bison ]
3838+ ++ (op fiddleSupport libffi)
3739 ++ (ops cursesSupport [ ncurses readline ] )
3840 ++ (op docSupport groff )
3941 ++ (op zlibSupport zlib)
···4749 ++ (op (!cursesSupport && stdenv.isDarwin) readline);
48504951 enableParallelBuilding = true;
5252+5353+ # Fix a build failure on systems with nix store optimisation.
5454+ # (The build process attempted to copy file a overwriting file b, where a and
5555+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5656+ # https://github.com/NixOS/nixpkgs/issues/4266
5757+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
50585159 patches = ops useRailsExpress [
5260 "${patchSet}/patches/ruby/2.0.0/p481/01-zero-broken-tests.patch"
+8
pkgs/development/interpreters/ruby/ruby-2.1.0.nix
···55, ncurses, readline, cursesSupport ? false
66, groff, docSupport ? false
77, libyaml, yamlSupport ? true
88+, libffi, fiddleSupport ? true
89, ruby_2_1_0, autoreconfHook, bison, useRailsExpress ? true
910}:
1011···3536 NROFF = "${groff}/bin/nroff";
36373738 buildInputs = ops useRailsExpress [ autoreconfHook bison ]
3939+ ++ (op fiddleSupport libffi)
3840 ++ (ops cursesSupport [ ncurses readline ] )
3941 ++ (op docSupport groff )
4042 ++ (op zlibSupport zlib)
···4850 ++ (op (!cursesSupport && stdenv.isDarwin) readline);
49515052 enableParallelBuilding = true;
5353+5454+ # Fix a build failure on systems with nix store optimisation.
5555+ # (The build process attempted to copy file a overwriting file b, where a and
5656+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5757+ # https://github.com/NixOS/nixpkgs/issues/4266
5858+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
51595260 patches = ops useRailsExpress [
5361 "${patchSet}/patches/ruby/2.1.0/railsexpress/01-current-2.1.1-fixes.patch"
+8
pkgs/development/interpreters/ruby/ruby-2.1.1.nix
···55, ncurses, readline, cursesSupport ? false
66, groff, docSupport ? false
77, libyaml, yamlSupport ? true
88+, libffi, fiddleSupport ? true
89, ruby_2_1_1, autoreconfHook, bison, useRailsExpress ? true
910}:
1011···3536 NROFF = "${groff}/bin/nroff";
36373738 buildInputs = ops useRailsExpress [ autoreconfHook bison ]
3939+ ++ (op fiddleSupport libffi)
3840 ++ (ops cursesSupport [ ncurses readline ] )
3941 ++ (op docSupport groff )
4042 ++ (op zlibSupport zlib)
···4850 ++ (op (!cursesSupport && stdenv.isDarwin) readline);
49515052 enableParallelBuilding = true;
5353+5454+ # Fix a build failure on systems with nix store optimisation.
5555+ # (The build process attempted to copy file a overwriting file b, where a and
5656+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5757+ # https://github.com/NixOS/nixpkgs/issues/4266
5858+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
51595260 patches = ops useRailsExpress [
5361 "${patchSet}/patches/ruby/2.1.0/railsexpress/01-zero-broken-tests.patch"
+8
pkgs/development/interpreters/ruby/ruby-2.1.2.nix
···55, ncurses, readline, cursesSupport ? false
66, groff, docSupport ? false
77, libyaml, yamlSupport ? true
88+, libffi, fiddleSupport ? true
89, ruby_2_1_2, autoreconfHook, bison, useRailsExpress ? true
910}:
1011···3536 NROFF = "${groff}/bin/nroff";
36373738 buildInputs = ops useRailsExpress [ autoreconfHook bison ]
3939+ ++ (op fiddleSupport libffi)
3840 ++ (ops cursesSupport [ ncurses readline ] )
3941 ++ (op docSupport groff )
4042 ++ (op zlibSupport zlib)
···4850 ++ (op (!cursesSupport && stdenv.isDarwin) readline);
49515052 enableParallelBuilding = true;
5353+5454+ # Fix a build failure on systems with nix store optimisation.
5555+ # (The build process attempted to copy file a overwriting file b, where a and
5656+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5757+ # https://github.com/NixOS/nixpkgs/issues/4266
5858+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
51595260 patches = ops useRailsExpress [
5361 "${patchSet}/patches/ruby/2.1.2/railsexpress/01-zero-broken-tests.patch"
+114
pkgs/development/interpreters/ruby/ruby-2.1.3.nix
···11+{ stdenv, fetchurl, fetchgit, fetchFromGitHub
22+, zlib, zlibSupport ? true
33+, openssl, opensslSupport ? true
44+, gdbm, gdbmSupport ? true
55+, ncurses, readline, cursesSupport ? false
66+, groff, docSupport ? false
77+, libyaml, yamlSupport ? true
88+, libffi, fiddleSupport ? true
99+, ruby_2_1_3, autoreconfHook, bison, useRailsExpress ? true
1010+}:
1111+1212+let
1313+ op = stdenv.lib.optional;
1414+ ops = stdenv.lib.optionals;
1515+ patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; };
1616+ config = import ./config.nix fetchgit;
1717+ baseruby = ruby_2_1_3.override { useRailsExpress = false; };
1818+in
1919+2020+stdenv.mkDerivation rec {
2121+ version = with passthru; "${majorVersion}.${minorVersion}.${teenyVersion}-p${patchLevel}";
2222+2323+ name = "ruby-${version}";
2424+2525+ src = if useRailsExpress then fetchFromGitHub {
2626+ owner = "ruby";
2727+ repo = "ruby";
2828+ rev = "v2_1_3";
2929+ sha256 = "1pnam9jry2l2mbji3gvrbb7jyisxl99xjz6l1qrccwnfinxxbmhv";
3030+ } else fetchurl {
3131+ url = "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.3.tar.gz";
3232+ sha256 = "00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608";
3333+ };
3434+3535+ # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
3636+ NROFF = "${groff}/bin/nroff";
3737+3838+ buildInputs = ops useRailsExpress [ autoreconfHook bison ]
3939+ ++ (op fiddleSupport libffi)
4040+ ++ (ops cursesSupport [ ncurses readline ])
4141+ ++ (op docSupport groff)
4242+ ++ (op zlibSupport zlib)
4343+ ++ (op opensslSupport openssl)
4444+ ++ (op gdbmSupport gdbm)
4545+ ++ (op yamlSupport libyaml)
4646+ # Looks like ruby fails to build on darwin without readline even if curses
4747+ # support is not enabled, so add readline to the build inputs if curses
4848+ # support is disabled (if it's enabled, we already have it) and we're
4949+ # running on darwin
5050+ ++ (op (!cursesSupport && stdenv.isDarwin) readline);
5151+5252+ enableParallelBuilding = true;
5353+5454+ # Fix a build failure on systems with nix store optimisation.
5555+ # (The build process attempted to copy file a overwriting file b, where a and
5656+ # b are hard-linked, which results in cp returning a non-zero exit code.)
5757+ # https://github.com/NixOS/nixpkgs/issues/4266
5858+ postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"'';
5959+6060+ patches = ops useRailsExpress [
6161+ "${patchSet}/patches/ruby/2.1.3/railsexpress/01-zero-broken-tests.patch"
6262+ "${patchSet}/patches/ruby/2.1.3/railsexpress/02-improve-gc-stats.patch"
6363+ "${patchSet}/patches/ruby/2.1.3/railsexpress/03-display-more-detailed-stack-trace.patch"
6464+ "${patchSet}/patches/ruby/2.1.3/railsexpress/04-show-full-backtrace-on-stack-overflow.patch"
6565+ "${patchSet}/patches/ruby/2.1.3/railsexpress/05-funny-falcon-stc-density.patch"
6666+ "${patchSet}/patches/ruby/2.1.3/railsexpress/06-funny-falcon-stc-pool-allocation.patch"
6767+ "${patchSet}/patches/ruby/2.1.3/railsexpress/07-aman-opt-aset-aref-str.patch"
6868+ "${patchSet}/patches/ruby/2.1.3/railsexpress/08-funny-falcon-method-cache.patch"
6969+ ];
7070+7171+ # Ruby >= 2.1.0 tries to download config.{guess,sub}
7272+ postPatch = ''
7373+ rm tool/config_files.rb
7474+ cp ${config}/config.guess tool/
7575+ cp ${config}/config.sub tool/
7676+ '';
7777+7878+ configureFlags = ["--enable-shared" ]
7979+ ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
8080+ # on darwin, we have /usr/include/tk.h -- so the configure script detects
8181+ # that tk is installed
8282+ ++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]);
8383+8484+ installFlags = stdenv.lib.optionalString docSupport "install-doc";
8585+ # Bundler tries to create this directory
8686+ postInstall = ''
8787+ # Bundler tries to create this directory
8888+ mkdir -pv $out/${passthru.gemPath}
8989+ mkdir -p $out/nix-support
9090+ cat > $out/nix-support/setup-hook <<EOF
9191+ addGemPath() {
9292+ addToSearchPath GEM_PATH \$1/${passthru.gemPath}
9393+ }
9494+9595+ envHooks+=(addGemPath)
9696+ EOF
9797+ '';
9898+9999+ meta = {
100100+ license = "Ruby";
101101+ homepage = "http://www.ruby-lang.org/en/";
102102+ description = "The Ruby language";
103103+ platforms = stdenv.lib.platforms.all;
104104+ };
105105+106106+ passthru = rec {
107107+ majorVersion = "2";
108108+ minorVersion = "1";
109109+ teenyVersion = "3";
110110+ patchLevel = "0";
111111+ libPath = "lib/ruby/${majorVersion}.${minorVersion}";
112112+ gemPath = "lib/ruby/gems/${majorVersion}.${minorVersion}";
113113+ };
114114+}
···10101111 nativeBuildInputs = [ flex bison ];
12121313- configureFlags = stdenv.lib.optionals stdenv.isLinux "--with-pcap=linux";
1313+ # We need to force the autodetection because detection doesn't
1414+ # work in pure build enviroments.
1515+ configureFlags =
1616+ if stdenv.isLinux then [ "--with-pcap=linux" ]
1717+ else if stdenv.isDarwin then [ "--with-pcap=bpf" ]
1818+ else [];
14191520 preInstall = ''mkdir -p $out/bin'';
1621
···55#TODO: share most stuff between python and non-python builds, perhaps via multiple-output
6677let
88- version = "2.9.1";
88+ version = "2.9.2";
99in
10101111stdenv.mkDerivation (rec {
···13131414 src = fetchurl {
1515 url = "ftp://xmlsoft.org/libxml2/${name}.tar.gz";
1616- sha256 = "1nqgd1qqmg0cg09mch78m2ac9klj9n87blilx4kymi7jcv5n8g7x";
1616+ sha256 = "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i";
1717 };
18181919 buildInputs = stdenv.lib.optional pythonSupport python
-8
pkgs/development/libraries/libxml2/setup-hook.sh
···1111if test -z "$libxmlHookDone"; then
1212 libxmlHookDone=1
13131414- # Set http_proxy and ftp_proxy to an invalid host to prevent
1515- # xmllint and xsltproc from trying to download DTDs from the
1616- # network even when --nonet is not given. That would be impure.
1717- # (Note that .invalid is a reserved domain guaranteed not to
1818- # work.)
1919- export http_proxy=http://nodtd.invalid/
2020- export ftp_proxy=http://nodtd.invalid/
2121-2214 # Set up XML_CATALOG_FILES. An empty initial value prevents
2315 # xmllint and xsltproc from looking in /etc/xml/catalog.
2416 export XML_CATALOG_FILES
···11{ stdenv, fetchurl }:
2233stdenv.mkDerivation rec {
44- name = "npth-0.91";
44+ name = "npth-1.0";
5566 src = fetchurl {
77 url = "ftp://ftp.gnupg.org/gcrypt/npth/${name}.tar.bz2";
88- sha256 = "1qgs1n70x83dyyysabg50dh8s3464jwsa63qi5if2cd3sk78dvya";
88+ sha256 = "0vppr13821bkdv8348067l1aj3sb0n0rbmnsgymzy3iifvirvm4s";
99 };
10101111- meta = {
1111+ meta = with stdenv.lib; {
1212 description = "The New GNU Portable Threads Library";
1313 longDescription = ''
1414 This is a library to provide the GNU Pth API and thus a non-preemptive
···2020 that this is a solid way to provide a co-routine based framework.
2121 '';
2222 homepage = http://www.gnupg.org;
2323- license = stdenv.lib.licenses.lgpl3;
2424- platforms = stdenv.lib.platforms.all;
2323+ license = licenses.lgpl3;
2424+ platforms = platforms.all;
2525 };
2626}
···11+{ stdenv, fetchurl, ocaml, findlib }:
22+33+stdenv.mkDerivation {
44+55+ name = "ansiterminal-0.6.5";
66+77+ src = fetchurl {
88+ url = "https://forge.ocamlcore.org/frs/download.php/1206/ANSITerminal-0.6.5.tar.gz";
99+ sha256 = "1j9kflv2i16vf9hy031cl6z8hv6791mjbhnd9bw07y1pswdlx1r6";
1010+ };
1111+1212+ buildInputs = [ ocaml findlib ];
1313+1414+ configurePhase = "ocaml setup.ml -configure --prefix $out";
1515+1616+ buildPhase = "ocaml setup.ml -build";
1717+1818+ installPhase = "ocaml setup.ml -install";
1919+2020+ createFindlibDestdir = true;
2121+2222+ meta = with stdenv.lib; {
2323+ homepage = "https://forge.ocamlcore.org/projects/ansiterminal";
2424+ description = "A module allowing to use the colors and cursor movements on ANSI terminals";
2525+ longDescription = ''
2626+ ANSITerminal is a module allowing to use the colors and cursor
2727+ movements on ANSI terminals. It also works on the windows shell (but
2828+ this part is currently work in progress).
2929+ '';
3030+ license = licenses.lgpl3;
3131+ platforms = ocaml.meta.platforms;
3232+ maintainers = [ maintainers.jirkamarsik ];
3333+ };
3434+}
+41
pkgs/development/ocaml-modules/bolt/default.nix
···11+{ stdenv, fetchurl, ocaml, findlib, which }:
22+33+let inherit (stdenv.lib) getVersion versionAtLeast; in
44+55+assert versionAtLeast (getVersion ocaml) "4.00.0";
66+assert versionAtLeast (getVersion findlib) "1.3.3";
77+88+stdenv.mkDerivation rec {
99+1010+ name = "bolt-1.4";
1111+1212+ src = fetchurl {
1313+ url = "https://forge.ocamlcore.org/frs/download.php/1043/${name}.tar.gz";
1414+ sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy";
1515+ };
1616+1717+ buildInputs = [ ocaml findlib which ];
1818+1919+ # The custom `configure` script does not expect the --prefix
2020+ # option. Installation is handled by ocamlfind.
2121+ dontAddPrefix = true;
2222+2323+ createFindlibDestdir = true;
2424+2525+ buildFlags = "all";
2626+2727+ doCheck = true;
2828+ checkTarget = "tests";
2929+3030+ meta = with stdenv.lib; {
3131+ homepage = "http://bolt.x9c.fr";
3232+ description = "A logging tool for the OCaml language";
3333+ longDescription = ''
3434+ Bolt is a logging tool for the OCaml language. It is inspired by and
3535+ modeled after the famous log4j logging framework for Java.
3636+ '';
3737+ license = licenses.lgpl3;
3838+ platforms = ocaml.meta.platforms;
3939+ maintainers = [ maintainers.jirkamarsik ];
4040+ };
4141+}
···11+{ stdenv, fetchurl, ocaml, findlib, ncurses }:
22+33+stdenv.mkDerivation {
44+55+ name = "ocp-build-1.99.8-beta";
66+77+ src = fetchurl {
88+ url = "https://github.com/OCamlPro/ocp-build/archive/ocp-build.1.99.8-beta.tar.gz";
99+ sha256 = "06qh8v7k5m52xbivas08lblspsnvdl0vd7ghfj6wvpnfl8qvqabn";
1010+ };
1111+1212+ buildInputs = [ ocaml findlib ncurses ];
1313+1414+ patches = [ ./fix-for-no-term.patch ];
1515+1616+ # In the Nix sandbox, the TERM variable is unset and stty does not
1717+ # work. In such a case, ocp-build crashes due to a bug. The
1818+ # ./fix-for-no-term.patch fixes this bug in the source code and hence
1919+ # also in the final installed version of ocp-build. However, it does not
2020+ # fix the bug in the precompiled bootstrap version of ocp-build that is
2121+ # used during the compilation process. In order to bypass the bug until
2222+ # it's also fixed upstream, we simply set TERM to some valid entry in the
2323+ # terminfo database during the bootstrap.
2424+ TERM = "xterm";
2525+2626+ meta = with stdenv.lib; {
2727+ homepage = "http://typerex.ocamlpro.com/ocp-build.html";
2828+ description = "A build tool for OCaml";
2929+ longDescription = ''
3030+ ocp-build is a build system for OCaml application, based on simple
3131+ descriptions of packages. ocp-build combines the descriptions of
3232+ packages, and optimize the parallel compilation of files depending on
3333+ the number of cores and the automatically-infered dependencies
3434+ between source files.
3535+ '';
3636+ license = licenses.gpl3;
3737+ platforms = ocaml.meta.platforms;
3838+ maintainers = [ maintainers.jirkamarsik ];
3939+ };
4040+}
···11+{ stdenv, fetchurl, ocaml, findlib, ocpBuild, opam, cmdliner }:
22+33+let inherit (stdenv.lib) getVersion versionAtLeast; in
44+55+assert versionAtLeast (getVersion ocaml) "3.12.1";
66+assert versionAtLeast (getVersion ocpBuild) "1.99.3-beta";
77+88+stdenv.mkDerivation {
99+1010+ name = "ocp-indent-1.4.2b";
1111+1212+ src = fetchurl {
1313+ url = "https://github.com/OCamlPro/ocp-indent/archive/1.4.2b.tar.gz";
1414+ sha256 = "1p0n2zcl5kf543x2xlqrz1aa51f0dqal8l392sa41j6wx82j0gpb";
1515+ };
1616+1717+ buildInputs = [ ocaml findlib ocpBuild opam cmdliner ];
1818+1919+ createFindlibDestdir = true;
2020+2121+ # The supplied installer uses opam-installer which breaks when run
2222+ # normally since it tries to `mkdir $HOME`. However, we can use
2323+ # `opam-installer --script` to get the shell script that performs only
2424+ # the installation and just run that. Furthermore, we do the same that is
2525+ # done by pkgs/development/ocaml-modules/react and rename the paths meant
2626+ # for opam-installer so that they are in line with the other OCaml
2727+ # libraries in Nixpkgs.
2828+ installPhase = ''
2929+ opam-installer --script --prefix=$out ocp-indent.install \
3030+ | sed s!lib/ocp-indent!lib/ocaml/${getVersion ocaml}/site-lib/ocp-indent! \
3131+ | sh
3232+ '';
3333+3434+ meta = with stdenv.lib; {
3535+ homepage = "http://typerex.ocamlpro.com/ocp-indent.html";
3636+ description = "A customizable tool to indent OCaml code";
3737+ license = licenses.gpl3;
3838+ platforms = ocaml.meta.platforms;
3939+ maintainers = [ maintainers.jirkamarsik ];
4040+ };
4141+}
+29
pkgs/development/tools/parsing/hammer/default.nix
···11+{ stdenv, fetchgit, glib, pkgconfig, python, scons, pythonPackages }:
22+33+stdenv.mkDerivation rec {
44+ name = "hammer-${version}";
55+ version = "e7aa734";
66+77+ src = fetchgit {
88+ url = "git://github.com/UpstandingHackers/hammer";
99+ sha256 = "1v8f2a6bgjgdkhbqz751bqjlwb9lmqn5x63xcskwcl2b9n36vqi9";
1010+ rev = "e7aa73446e23f4af2fce5f88572aae848f212c16";
1111+ };
1212+1313+ buildInputs = [ glib pkgconfig python scons ];
1414+ buildPhase = "scons prefix=$out";
1515+ installPhase = "scons prefix=$out install";
1616+1717+ meta = with stdenv.lib; {
1818+ description = "Hammer is a parsing library";
1919+ longDescription = "Hammer is a parsing library. Like many modern parsing libraries,
2020+ it provides a parser combinator interface for writing grammars
2121+ as inline domain-specific languages, but Hammer also provides a
2222+ variety of parsing backends. It's also bit-oriented rather than
2323+ character-oriented, making it ideal for parsing binary data such
2424+ as images, network packets, audio, and executables.";
2525+ homepage = https://github.com/UpstandingHackers/hammer;
2626+ license = licenses.gpl2;
2727+ platforms = platforms.linux;
2828+ };
2929+}
···11+{ stdenv, fetchurl, pythonPackages, lilypond, pyqt4 }:
22+33+pythonPackages.buildPythonPackage rec {
44+ name = "frescobaldi-${version}";
55+ version = "2.0.16";
66+77+ src = fetchurl {
88+ url = "https://github.com/wbsoft/frescobaldi/releases/download/"
99+ + "v2.0.16/${name}.tar.gz";
1010+ sha256 = "12pabvq5b2lq84q3kx8lh02zh6ali6v4wnin2k2ycnm45mk9ms6q";
1111+ };
1212+1313+ propagatedBuildInputs = with pythonPackages; [ lilypond
1414+ pyqt4 poppler-qt4 ];
1515+1616+ patches = [ ./setup.cfg.patch ./python-path.patch ];
1717+1818+ meta = with stdenv.lib; {
1919+ homepage = http://frescobaldi.org/;
2020+ description = ''Frescobaldi is a LilyPond sheet music text editor'';
2121+ longDescription = ''
2222+ Powerful text editor with syntax highlighting and automatic completion,
2323+ Music view with advanced Point & Click, Midi player to proof-listen
2424+ LilyPond-generated MIDI files, Midi capturing to enter music,
2525+ Powerful Score Wizard to quickly setup a music score, Snippet Manager
2626+ to store and apply text snippets, templates or scripts, Use multiple
2727+ versions of LilyPond, automatically selects the correct version, Built-in
2828+ LilyPond documentation browser and built-in User Guide, Smart
2929+ layout-control functions like coloring specific objects in the PDF,
3030+ MusicXML import, Modern user iterface with configurable colors,
3131+ fonts and keyboard shortcuts
3232+ '';
3333+ license = licenses.gpl2Plus;
3434+ maintainers = [ maintainers.sepi ];
3535+ platforms = platforms.all;
3636+ };
3737+}
···11+#!/usr/bin/env bash
22+set -e
33+44+# Get the latest versions from kernel.org
55+LINUXSED='s/.*linux-\([0-9]\+\(.[0-9]\+\)*\).*/\1/p'
66+KDATA="$(curl -s https://www.kernel.org | sed -n -e '/Download complete/p')"
77+VERSIONS=($(sed -n -e $LINUXSED <<< "$KDATA" | sort -Vr))
88+99+# Remove mainline version if there is a stable update
1010+# Note due to sorting these two will always exist at the bottom
1111+if grep -q "^${VERSIONS[1]}" <<< "${VERSIONS[0]}"; then
1212+ VERSIONS=(${VERSIONS[@]:0:1} ${VERSIONS[@]:2})
1313+fi
1414+1515+# Inspect each file and see if it has the latest version
1616+NIXPKGS="$(git rev-parse --show-toplevel)"
1717+ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
1818+ KERNEL="$(sed -n $LINUXSED <<< "$FILE")"
1919+ [ -z "$KERNEL" ] && continue
2020+2121+ # Find the matching new kernel version
2222+ MATCHING=""
2323+ for V in "${VERSIONS[@]}"; do
2424+ if grep -q "^$KERNEL" <<< "$V"; then
2525+ MATCHING="$V"
2626+ break
2727+ fi
2828+ done
2929+ if [ -z "$MATCHING" ]; then
3030+ echo "Out-of-support $KERNEL"
3131+ continue
3232+ fi
3333+3434+ # Inspect the nix expression to check for changes
3535+ DATA="$(<$NIXPKGS/pkgs/os-specific/linux/kernel/$FILE)"
3636+ URL="$(sed -n -e 's/.*url = "\(.*\)";.*/\1/p' <<< "$DATA" | sed -e "s/\${version}/$MATCHING/g")"
3737+ OLDVER=$(sed -n -e 's/.*version = "\(.*\)".*/\1/p' <<< "$DATA")
3838+ if [ "$OLDVER" = "$V" ]; then
3939+ echo "No updates for $KERNEL"
4040+ continue
4141+ fi
4242+4343+ # Download the new file for the hash
4444+ if ! HASH="$(nix-prefetch-url $URL 2>/dev/null)"; then
4545+ echo "Failed to get hash of $URL"
4646+ continue
4747+ fi
4848+ sed -i "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
4949+5050+ # Rewrite the expression
5151+ sed -i -e '/version = /d' -e '/modDirVersion = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
5252+ if grep -q '^[0-9]\+.[0-9]\+$' <<< "$V"; then
5353+ sed -i "\#import ./generic.nix (args // rec {#a \ modDirVersion = \"${V}.0\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
5454+ fi
5555+ sed -i "\#import ./generic.nix (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
5656+5757+ # Commit the changes
5858+ git add -u $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
5959+ git commit -m "kernel: $OLDVER -> $V" >/dev/null 2>&1
6060+6161+ echo "Updated $OLDVER -> $V"
6262+done
···99if test -z "$sgmlHookDone"; then
1010 sgmlHookDone=1
11111212- # Set http_proxy and ftp_proxy to a invalid host to prevent
1313- # xmllint and xsltproc from trying to download DTDs from the
1414- # network even when --nonet is not given. That would be impure.
1515- # (Note that .invalid is a reserved domain guaranteed not to
1616- # work.)
1717- export http_proxy=http://nodtd.invalid/
1818- export ftp_proxy=http://nodtd.invalid/
1919-2012 export SGML_CATALOG_FILES
2113 envHooks+=(addSGMLCatalogs)
2214fi