Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
Tuomas Tynkkynen 2018-05-22 17:48:29 +03:00
commit f9feacfc7c
47 changed files with 1103 additions and 581 deletions

View File

@ -70,7 +70,7 @@ in {
resources = { resources = {
limits = { limits = {
cpu = "100m"; cpu = "100m";
memory = "50Mi"; memory = "250Mi";
}; };
requests = { requests = {
cpu = "100m"; cpu = "100m";

View File

@ -128,9 +128,17 @@ in {
you might need to specify it in <literal>extraPackages</literal>. you might need to specify it in <literal>extraPackages</literal>.
''; '';
}; };
openFirewall = mkOption {
default = false;
type = types.bool;
description = "Whether to open the firewall for the specified port.";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
systemd.services.home-assistant = { systemd.services.home-assistant = {
description = "Home Assistant"; description = "Home Assistant";
after = [ "network.target" ]; after = [ "network.target" ];

View File

@ -344,7 +344,7 @@ in
default = default =
[ [
"$HOME/.nix-defexpr/channels" "$HOME/.nix-defexpr/channels"
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
"nixos-config=/etc/nixos/configuration.nix" "nixos-config=/etc/nixos/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];

View File

@ -209,7 +209,7 @@ let
'' ''
echo "${cidr}" >> $state echo "${cidr}" >> $state
echo -n "adding route ${cidr}... " echo -n "adding route ${cidr}... "
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" 2>&1); then if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" proto static 2>&1); then
echo "done" echo "done"
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
echo "'ip route add "${cidr}" ${options} ${via} dev "${i.name}"' failed: $out" echo "'ip route add "${cidr}" ${options} ${via} dev "${i.name}"' failed: $out"

View File

@ -6,11 +6,11 @@ uiEnv = pkgs.callPackage ./env.nix { };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "parity-ui-${version}"; name = "parity-ui-${version}";
version = "0.1.1"; version = "0.2.1";
src = fetchurl { src = fetchurl {
url = "https://github.com/parity-js/shell/releases/download/v${version}/parity-ui_${version}_amd64.deb"; url = "https://github.com/parity-js/shell/releases/download/v${version}/parity-ui_${version}_amd64.deb";
sha256 = "1jym6q63m5f4xm06dxiiabhbqnr0hysf2d3swysncs5hg6w00lh3"; sha256 = "08gh438mqxj2h8i9hv826bx040wmkmdgsda5grj0k81459vds31l";
name = "${name}.deb"; name = "${name}.deb";
}; };

View File

@ -1,52 +0,0 @@
{ stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}:
stdenv.mkDerivation rec {
name = "atom-beta-${version}";
version = "1.24.0-beta3";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "02nnjjwlkxafi2fbi4gz276nqkmi92kf3q414vw1k3kc8q5zvxrs";
name = "${name}.deb";
};
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/usr/
ar p $src data.tar.xz | tar -C $out -xJ ./usr
substituteInPlace $out/usr/share/applications/atom-beta.desktop \
--replace /usr/share/atom-beta $out/bin
mv $out/usr/* $out/
rm -r $out/share/lintian
rm -r $out/usr/
sed -i "s/'atom-beta'/'.atom-beta-wrapped'/" $out/bin/atom-beta
wrapProgram $out/bin/atom-beta \
--prefix "PATH" : "${gvfs}/bin"
fixupPhase
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}:$out/share/atom-beta" \
$out/share/atom-beta/atom
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}" \
$out/share/atom-beta/resources/app/apm/bin/node
#rm -f $out/share/atom-beta/resources/app/node_modules/dugite/git/bin/git
#ln -s ${pkgs.git}/bin/git $out/share/atom-beta/resources/app/node_modules/dugite/git/bin/git
find $out/share/atom-beta -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom-beta" {} \;
paxmark m $out/share/atom-beta/atom
paxmark m $out/share/atom-beta/resources/app/apm/bin/node
'';
meta = with stdenv.lib; {
description = "A hackable text editor for the 21st Century";
homepage = https://atom.io/;
license = licenses.mit;
maintainers = [ maintainers.offline maintainers.nequissimus ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -1,53 +1,69 @@
{ stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}: { stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}:
stdenv.mkDerivation rec { let
name = "atom-${version}"; common = pname: {version, sha256}: stdenv.mkDerivation rec {
version = "1.27.0"; name = "${pname}-${version}";
inherit version;
src = fetchurl { src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb"; url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "1r37s6ndxyib644v7nlgha1pkcnz7kxpmlkhh41l5jp4dpc6iik6"; name = "${name}.deb";
name = "${name}.deb"; inherit sha256;
};
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/usr/
ar p $src data.tar.xz | tar -C $out -xJ ./usr
substituteInPlace $out/usr/share/applications/${pname}.desktop \
--replace /usr/share/${pname} $out/bin
mv $out/usr/* $out/
rm -r $out/share/lintian
rm -r $out/usr/
# sed -i "s/'${pname}'/'.${pname}-wrapped'/" $out/bin/${pname}
wrapProgram $out/bin/${pname} \
--prefix "PATH" : "${gvfs}/bin"
fixupPhase
share=$out/share/${pname}
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}:$share" \
$share/atom
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}" \
$share/resources/app/apm/bin/node
dugite=$share/resources/app.asar.unpacked/node_modules/dugite
rm -f $dugite/git/bin/git
ln -s ${pkgs.git}/bin/git $dugite/git/bin/git
rm -f $dugite/git/libexec/git-core/git
ln -s ${pkgs.git}/bin/git $dugite/git/libexec/git-core/git
find $share -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$share" {} \;
paxmark m $share/atom
paxmark m $share/resources/app/apm/bin/node
'';
meta = with stdenv.lib; {
description = "A hackable text editor for the 21st Century";
homepage = https://atom.io/;
license = licenses.mit;
maintainers = with maintainers; [ offline nequissimus synthetica ysndr ];
platforms = [ "x86_64-linux" ];
};
};
in stdenv.lib.mapAttrs common {
atom = {
version = "1.27.1";
sha256 = "08slv8s90wz2jcdrcqh2d815wfbrkwcdx9c3qbx8cml04hz8p2gx";
}; };
nativeBuildInputs = [ makeWrapper ]; atom-beta = {
version = "1.28.0-beta1";
buildCommand = '' sha256 = "1mkxq2a7sylj9jx1bs2v1pmgrwc10cgh810qic1lncq9jzpaik0n";
mkdir -p $out/usr/
ar p $src data.tar.xz | tar -C $out -xJ ./usr
substituteInPlace $out/usr/share/applications/atom.desktop \
--replace /usr/share/atom $out/bin
mv $out/usr/* $out/
rm -r $out/share/lintian
rm -r $out/usr/
wrapProgram $out/bin/atom \
--prefix "PATH" : "${gvfs}/bin"
fixupPhase
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}:$out/share/atom" \
$out/share/atom/atom
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}" \
$out/share/atom/resources/app/apm/bin/node
rm -f $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/bin/git
ln -s ${pkgs.git}/bin/git $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/bin/git
rm -f $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git
ln -s ${pkgs.git}/bin/git $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git
find $out/share/atom -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom" {} \;
paxmark m $out/share/atom/atom
paxmark m $out/share/atom/resources/app/apm/bin/node
'';
meta = with stdenv.lib; {
description = "A hackable text editor for the 21st Century";
homepage = https://atom.io/;
license = licenses.mit;
maintainers = with maintainers; [ offline nequissimus synthetica ysndr ];
platforms = [ "x86_64-linux" ];
}; };
} }

View File

@ -4,15 +4,16 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kakoune-unstable-${version}"; name = "kakoune-unstable-${version}";
version = "2018-03-22"; version = "2018-05-21";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = "kakoune"; repo = "kakoune";
owner = "mawww"; owner = "mawww";
rev = "f8e297acef1be0657b779fea5256f606a6c6a3a3"; rev = "878d2a4bdb674a5e7703a66e530520f48efba641";
sha256 = "14xmw3lkwzppm9bns55nmyb1lfihzhdyisf6xjqlszdj4mcf94jl"; sha256 = "0pwy6ilsb62s1792gjyvhvq8shj60l8lx26b58zvpfb54an4s6rk";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ]; buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
makeFlags = [ "debug=no" ];
postPatch = '' postPatch = ''
export PREFIX=$out export PREFIX=$out

View File

@ -0,0 +1,25 @@
{ stdenv, fetchgit, pidgin, glib, libxml2 }:
stdenv.mkDerivation rec {
name = "purple-xmpp-upload-2017-12-31";
src = fetchgit {
url = "https://github.com/Junker/purple-xmpp-http-upload";
rev = "178096cbfc9df165c2dc1677666439969d212b37";
sha256 = "12l9rqlgb4i50xxrfnvwz9sqfk0d3c0m6l09mnvfixqi8illyvlp";
};
buildInputs = [ pidgin glib libxml2 ];
installPhase = ''
install -Dm644 -t $out/lib/purple-2 jabber_http_file_upload.so
'';
meta = with stdenv.lib; {
homepage = https://github.com/Junker/purple-xmpp-http-upload;
description = "HTTP File Upload plugin for libpurple (XMPP Protocol XEP-0363)";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ emmanuelrosa ];
};
}

View File

@ -1,15 +1,15 @@
{ stdenv, fetchurl, ocaml }: { stdenv, fetchurl, ocamlPackages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "proverif-${version}"; name = "proverif-${version}";
version = "1.97pl1"; version = "2.00";
src = fetchurl { src = fetchurl {
url = "http://prosecco.gforge.inria.fr/personal/bblanche/proverif/proverif${version}.tar.gz"; url = "http://prosecco.gforge.inria.fr/personal/bblanche/proverif/proverif${version}.tar.gz";
sha256 = "1b0ji68crdli40a4z62gdq6fnygj3z2j63iaq4jki7wfc3nn3vgq"; sha256 = "0vjphj85ch9q39vc7sd6n4vxy5bplp017vlshk989yhfwb00r37y";
}; };
buildInputs = [ ocaml ]; buildInputs = with ocamlPackages; [ ocaml findlib lablgtk ];
buildPhase = "./build"; buildPhase = "./build";
installPhase = '' installPhase = ''

View File

@ -1,6 +1,6 @@
{ fetchurl }: { fetchurl }:
fetchurl { fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/7988bc2977184737900cc54b2dda27af6921f5ee.tar.gz"; url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/810aa8e3848857c1158ded74a52159220119d188.tar.gz";
sha256 = "1zagnnab5z3zymniw5rrdahlxrfpnyf30iysa1lylgwlscnzfv0l"; sha256 = "1s4x3ipn2san4rvfagmczdn70rhygpwwdmz0pqvy7q4rmgxy9x1i";
} }

View File

@ -91,7 +91,8 @@ stdenv.mkDerivation rec {
extraPrefix = "libraries/Cabal/"; extraPrefix = "libraries/Cabal/";
}) })
] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch ] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch; ++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
postPatch = "patchShebangs ."; postPatch = "patchShebangs .";

View File

@ -99,7 +99,8 @@ stdenv.mkDerivation rec {
(fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism (fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism
url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch"; url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch";
sha256 = "1lyysz6hfd1njcigpm8xppbnkadqfs0kvrp7s8vqgb38pjswj5hg"; sha256 = "1lyysz6hfd1njcigpm8xppbnkadqfs0kvrp7s8vqgb38pjswj5hg";
}); })
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
postPatch = "patchShebangs ."; postPatch = "patchShebangs .";

View File

@ -94,7 +94,8 @@ stdenv.mkDerivation rec {
sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3"; sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
extraPrefix = "utils/hsc2hs/"; extraPrefix = "utils/hsc2hs/";
stripLen = 1; stripLen = 1;
})]; })]
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
postPatch = "patchShebangs ."; postPatch = "patchShebangs .";

View File

@ -0,0 +1,24 @@
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index acd0d61..3e83c15 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1916,6 +1916,7 @@ linkBinary' staticLink dflags o_files dep_packages = do
++ pkg_framework_opts
++ debug_opts
++ thread_opts
+ ++ (if (platformOS platform `elem` [OSDarwin]) then [ "-Wl,-dead_strip_dylibs" ] else [])
))
exeFileName :: Bool -> DynFlags -> FilePath
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 1ab5b13..2ebbf51 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -1737,6 +1737,7 @@ linkDynLib dflags0 o_files dep_packages
++ map Option pkg_lib_path_opts
++ map Option pkg_link_opts
++ map Option pkg_framework_opts
+ ++ [ Option "-Wl,-dead_strip_dylibs" ]
)
OSiOS -> throwGhcExceptionIO (ProgramError "dynamic libraries are not supported on iOS target")
_ -> do

View File

@ -1,10 +1,12 @@
{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz { stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz
, glib, libiconv, libintl, libtool, expat , glib, libiconv, libintl, libtool, expat
}: }:
let let
generic = { major, minor, sha256, extraNativeBuildInputs ? [], extraBuildInputs ? [] }: generic = { major, minor, sha256, extraNativeBuildInputs ? [], extraBuildInputs ? [] }:
stdenv.mkDerivation rec { let
atLeast = lib.versionAtLeast "${major}.${minor}";
in stdenv.mkDerivation rec {
name = "vala-${major}.${minor}"; name = "vala-${major}.${minor}";
src = fetchurl { src = fetchurl {
@ -14,9 +16,15 @@ let
outputs = [ "out" "devdoc" ]; outputs = [ "out" "devdoc" ];
nativeBuildInputs = [ pkgconfig flex bison libxslt ] ++ extraNativeBuildInputs; nativeBuildInputs = [
pkgconfig flex bison libxslt
] ++ lib.optional (stdenv.isDarwin && (atLeast "0.38")) expat
++ extraNativeBuildInputs;
buildInputs = [ glib libiconv libintl ] ++ extraBuildInputs; buildInputs = [
glib libiconv libintl
] ++ lib.optional (atLeast "0.38") graphviz
++ extraBuildInputs;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Compiler for GObject type system"; description = "Compiler for GObject type system";
@ -29,12 +37,6 @@ let
in rec { in rec {
vala_0_23 = generic {
major = "0.23";
minor = "3";
sha256 = "101xjbc818g4849n9a80c2aai13zakj7mpnd7470xnkvz5jwqq96";
};
vala_0_26 = generic { vala_0_26 = generic {
major = "0.26"; major = "0.26";
minor = "2"; minor = "2";
@ -61,24 +63,21 @@ in rec {
vala_0_36 = generic { vala_0_36 = generic {
major = "0.36"; major = "0.36";
minor = "12"; minor = "13";
sha256 = "1nvw721piwdh15bipg0sdll9kvgpz0y9i5fpszlc7y9w64yis25l"; sha256 = "0gxz7yisd9vh5d2889p60knaifz5zndgj98zkdfkkaykdfdq4m9k";
}; };
vala_0_38 = generic { vala_0_38 = generic {
major = "0.38"; major = "0.38";
minor = "4"; minor = "9";
sha256 = "1sg5gaq3jhgr9vzh2ypiw475167k150wmyglymr7wwqppmikmcrc"; sha256 = "1dh1qacfsc1nr6hxwhn9lqmhnq39rv8gxbapdmj1v65zs96j3fn3";
extraNativeBuildInputs = [ autoconf ] ++ stdenv.lib.optionals stdenv.isDarwin [ libtool expat ]; extraNativeBuildInputs = [ autoconf ] ++ lib.optional stdenv.isDarwin libtool;
extraBuildInputs = [ graphviz ];
}; };
vala_0_40 = generic { vala_0_40 = generic {
major = "0.40"; major = "0.40";
minor = "0"; minor = "6";
sha256 = "0wcfljl55a9qvslfcc4sf76wdpwgn83n96b7fgb7r49ib35qz20m"; sha256 = "1qjbwhifwwqbdg5zilvnwm4n76g8p7jwqs3fa0biw3rylzqm193d";
extraNativeBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ expat ];
extraBuildInputs = [ graphviz ];
}; };
vala = vala_0_38; vala = vala_0_38;

View File

@ -2418,6 +2418,7 @@ extra-packages:
- haddock-library == 1.2.* # required for haddock-api-2.16.x - haddock-library == 1.2.* # required for haddock-api-2.16.x
- haddock-library == 1.4.3 # required for haddock-api-2.17.x - haddock-library == 1.4.3 # required for haddock-api-2.17.x
- haddock-library == 1.4.4 # required for haddock-api-2.18.x - haddock-library == 1.4.4 # required for haddock-api-2.18.x
- haddock-library == 1.5.* # required for stylish-cabal-0.4.0.1
- happy <1.19.6 # newer versions break Agda - happy <1.19.6 # newer versions break Agda
- haskell-gi-overloading == 0.0 # gi-* packages use this dependency to disable overloading support - haskell-gi-overloading == 0.0 # gi-* packages use this dependency to disable overloading support
- haskell-src-exts == 1.19.* # required by hindent and structured-haskell-mode - haskell-src-exts == 1.19.* # required by hindent and structured-haskell-mode

File diff suppressed because it is too large Load Diff

View File

@ -299,8 +299,11 @@ rec {
# This is useful to build environments for developing on that # This is useful to build environments for developing on that
# package. # package.
getHaskellBuildInputs = p: getHaskellBuildInputs = p:
(p.override { mkDerivation = extractBuildInputs p.compiler; (overrideCabal p (args: {
}).haskellBuildInputs; passthru = (args.passthru or {}) // {
_getHaskellBuildInputs = extractBuildInputs p.compiler args;
};
}))._getHaskellBuildInputs;
# Under normal evaluation, simply return the original package. Under # Under normal evaluation, simply return the original package. Under
# nix-shell evaluation, return a nix-shell optimized environment. # nix-shell evaluation, return a nix-shell optimized environment.

View File

@ -38,7 +38,7 @@ let
inherit (stdenv) buildPlatform hostPlatform; inherit (stdenv) buildPlatform hostPlatform;
inherit (stdenv.lib) fix' extends makeOverridable; inherit (stdenv.lib) fix' extends makeOverridable;
inherit (haskellLib) overrideCabal; inherit (haskellLib) overrideCabal getHaskellBuildInputs;
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix { mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
inherit stdenv; inherit stdenv;
@ -238,7 +238,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
shellFor = { packages, withHoogle ? false, ... } @ args: shellFor = { packages, withHoogle ? false, ... } @ args:
let let
selected = packages self; selected = packages self;
packageInputs = builtins.map (p: p.override { mkDerivation = haskellLib.extractBuildInputs p.compiler; }) selected; packageInputs = builtins.map getHaskellBuildInputs selected;
haskellInputs = haskellInputs =
builtins.filter builtins.filter
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected) (input: pkgs.lib.all (p: input.outPath != p.outPath) selected)

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, pkgconfig, gnused_422, perl, python2, zip, libffi, readline, icu, zlib, nspr }: { stdenv, fetchurl, pkgconfig, gnused_422, perl, python2, zip, libffi, readline, icu, zlib, nspr
, libobjc }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "38.2.1.rc0"; version = "38.2.1.rc0";
@ -13,7 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "0p4bmbpgkfsj54xschcny0a118jdrdgg0q29rwxigg3lh5slr681"; sha256 = "0p4bmbpgkfsj54xschcny0a118jdrdgg0q29rwxigg3lh5slr681";
}; };
buildInputs = [ libffi readline icu zlib nspr ]; buildInputs = [ libffi readline icu zlib nspr ]
++ stdenv.lib.optional stdenv.isDarwin libobjc;
nativeBuildInputs = [ pkgconfig perl python2 zip gnused_422 ]; nativeBuildInputs = [ pkgconfig perl python2 zip gnused_422 ];
postUnpack = "sourceRoot=\${sourceRoot}/js/src"; postUnpack = "sourceRoot=\${sourceRoot}/js/src";
@ -57,6 +59,6 @@ stdenv.mkDerivation rec {
# TODO: MPL/GPL/LGPL tri-license. # TODO: MPL/GPL/LGPL tri-license.
maintainers = [ maintainers.abbradar ]; maintainers = [ maintainers.abbradar ];
platforms = platforms.linux; platforms = platforms.unix;
}; };
} }

View File

@ -13,6 +13,6 @@ stdenv.mkDerivation rec {
description = "Simple and robust network communication layer on top of UDP"; description = "Simple and robust network communication layer on top of UDP";
license = stdenv.lib.licenses.mit; license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -36,6 +36,6 @@ stdenv.mkDerivation rec {
description = "A set of cuda-enabled texture tools and compressors"; description = "A set of cuda-enabled texture tools and compressors";
homepage = https://github.com/castano/nvidia-texture-tools; homepage = https://github.com/castano/nvidia-texture-tools;
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.unix;
}; };
} }

View File

@ -1,9 +1,7 @@
{ stdenv, requireFile, glibc, patchelf, rpmextract, libaio, makeWrapper, odbcSupport ? false, unixODBC }: { stdenv, requireFile, autoPatchelfHook, rpmextract, libaio, makeWrapper, odbcSupport ? false, unixODBC }:
assert odbcSupport -> unixODBC != null; assert odbcSupport -> unixODBC != null;
with stdenv.lib;
let let
baseVersion = "12.2"; baseVersion = "12.2";
requireSource = version: rel: part: hash: (requireFile rec { requireSource = version: rel: part: hash: (requireFile rec {
@ -27,56 +25,27 @@ in stdenv.mkDerivation rec {
version = "${baseVersion}.0.1.0"; version = "${baseVersion}.0.1.0";
name = "oracle-instantclient-${version}"; name = "oracle-instantclient-${version}";
srcBase = (requireSource version "1" "basic" "43c4bfa938af741ae0f9964a656f36a0700849f5780a2887c8e9f1be14fe8b66"); buildInputs = [ libaio stdenv.cc.cc.lib ] ++ stdenv.lib.optional odbcSupport unixODBC;
srcDevel = (requireSource version "1" "devel" "4c7ad8d977f9f908e47c5e71ce56c2a40c7dc83cec8a5c106b9ff06d45bb3442"); nativeBuildInputs = [ autoPatchelfHook makeWrapper rpmextract ];
srcSqlplus = (requireSource version "1" "sqlplus" "303e82820a10f78e401e2b07d4eebf98b25029454d79f06c46e5f9a302ce5552");
srcOdbc = optionalString odbcSupport (requireSource version "2" "odbc" "e870c84d2d4be6f77c0760083b82b7ffbb15a4bf5c93c4e6c84f36d6ed4dfdf1");
buildInputs = [ glibc ] ++ srcs = [
optional odbcSupport unixODBC; (requireSource version "1" "basic" "43c4bfa938af741ae0f9964a656f36a0700849f5780a2887c8e9f1be14fe8b66")
(requireSource version "1" "devel" "4c7ad8d977f9f908e47c5e71ce56c2a40c7dc83cec8a5c106b9ff06d45bb3442")
(requireSource version "1" "sqlplus" "303e82820a10f78e401e2b07d4eebf98b25029454d79f06c46e5f9a302ce5552")
] ++ stdenv.lib.optional odbcSupport (requireSource version "2" "odbc" "e870c84d2d4be6f77c0760083b82b7ffbb15a4bf5c93c4e6c84f36d6ed4dfdf1");
nativeBuildInputs = [ rpmextract patchelf makeWrapper ]; unpackCmd = "rpmextract $curSrc";
buildCommand = '' installPhase = ''
mkdir -p "${name}"
cd "${name}"
${rpmextract}/bin/rpmextract "${srcBase}"
${rpmextract}/bin/rpmextract "${srcDevel}"
${rpmextract}/bin/rpmextract "${srcSqlplus}"
'' + optionalString odbcSupport ''${rpmextract}/bin/rpmextract ${srcOdbc}
'' + ''
mkdir -p "$out/"{bin,include,lib,"share/${name}/demo/"} mkdir -p "$out/"{bin,include,lib,"share/${name}/demo/"}
mv "usr/share/oracle/${baseVersion}/client64/demo/"* "$out/share/${name}/demo/"
mv "usr/include/oracle/${baseVersion}/client64/"* "$out/include/"
mv "usr/lib/oracle/${baseVersion}/client64/lib/"* "$out/lib/"
mv "usr/lib/oracle/${baseVersion}/client64/bin/"* "$out/bin/"
ln -s "$out/bin/sqlplus" "$out/bin/sqlplus64"
for lib in $out/lib/lib*.so; do install -Dm755 lib/oracle/${baseVersion}/client64/bin/* $out/bin
test -f $lib || continue ln -s $out/bin/sqlplus $out/bin/sqlplus64
chmod +x $lib install -Dm644 lib/oracle/${baseVersion}/client64/lib/* $out/lib
patchelf --force-rpath --set-rpath "$out/lib:${libaio}/lib" \ install -Dm644 include/oracle/${baseVersion}/client64/* $out/include
$lib install -Dm644 share/oracle/${baseVersion}/client64/demo/* $out/share/${name}/demo
done
for lib in $out/lib/libsqora*; do
test -f $lib || continue
chmod +x $lib
patchelf --force-rpath --set-rpath "$out/lib:${unixODBC}/lib" \
$lib
done
for exe in $out/bin/{adrci,genezi,sqlplus}; do
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--force-rpath --set-rpath "$out/lib:${libaio}/lib" \
$exe
wrapProgram $exe --prefix LD_LIBRARY_PATH ":" $out/lib
done
''; '';
dontStrip = true;
dontPatchELF = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Oracle instant client libraries and sqlplus CLI"; description = "Oracle instant client libraries and sqlplus CLI";
longDescription = '' longDescription = ''
@ -86,6 +55,7 @@ in stdenv.mkDerivation rec {
''; '';
license = licenses.unfree; license = licenses.unfree;
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ pesterhazy ]; maintainers = with maintainers; [ pesterhazy flokli ];
hydraPlatforms = [];
}; };
} }

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis { stdenv, fetchurl, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage , glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL
}: }:
let let
@ -13,9 +14,13 @@ stdenv.mkDerivation rec {
sha256 = "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab"; sha256 = "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab";
}; };
buildInputs = [ cmake libX11 freetype libjpeg openal flac libvorbis glew buildInputs = [ cmake libX11 freetype libjpeg openal flac libvorbis glew
libXrandr libXrender udev xcbutilimage libXrandr libXrender xcbutilimage
]; ] ++ stdenv.lib.optional stdenv.isLinux udev
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes" ]; ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
"-DSFML_BUILD_FRAMEWORKS=no"
"-DSFML_USE_SYSTEM_DEPS=yes" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.sfml-dev.org/; homepage = http://www.sfml-dev.org/;
description = "Simple and fast multimedia library"; description = "Simple and fast multimedia library";
@ -26,6 +31,6 @@ stdenv.mkDerivation rec {
''; '';
license = licenses.zlib; license = licenses.zlib;
maintainers = [ maintainers.astsmtl ]; maintainers = [ maintainers.astsmtl ];
platforms = platforms.linux; platforms = platforms.unix;
}; };
} }

View File

@ -0,0 +1,30 @@
{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, requests
, requests-mock, pytest
}:
buildPythonPackage rec {
pname = "pyairvisual";
version = "1.0.0";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "v${version}";
sha256 = "0ng6k07n91k5l68zk3hl4fywb33admp84wqdm20qmmw9yc9c64fd";
};
checkInputs = [ pytest requests-mock ];
propagatedBuildInputs = [ requests ];
checkPhase = ''
py.test tests
'';
disabled = !isPy3k;
meta = with lib; {
description = "A thin Python wrapper for the AirVisual API";
license = licenses.mit;
homepage = https://github.com/bachya/pyairvisual;
};
}

View File

@ -1,19 +1,17 @@
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub }: { stdenv, buildPythonPackage, isPy3k, fetchPypi }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyhomematic"; pname = "pyhomematic";
version = "0.1.42"; version = "0.1.43";
disabled = !isPy3k; disabled = !isPy3k;
# PyPI tarball does not include tests/ directory src = fetchPypi {
src = fetchFromGitHub { inherit pname version;
owner = "danielperna84"; sha256 = "0b6f4f5c8ddca15e0a1df367bafdffb2f08f1e42f17c78b9470573287e5b20bc";
repo = pname;
rev = version;
sha256 = "0h7bq66q22kzj1xwhxmr7knibsmb4csjwq3jr19fyl9sxxmgqwqy";
}; };
# PyPI tarball does not include tests/ directory
# Unreliable timing: https://github.com/danielperna84/pyhomematic/issues/126 # Unreliable timing: https://github.com/danielperna84/pyhomematic/issues/126
doCheck = false; doCheck = false;

View File

@ -0,0 +1,39 @@
{ stdenv, lib, fetchPypi, buildPythonPackage, fetchurl, libvorbis, flac, libogg, libopus, opusfile }:
buildPythonPackage rec {
pname = "PyOgg";
version = "0.6.2a1";
src = fetchPypi {
inherit pname version;
sha256 = "1mjh5zx7mfy246lya1qc42j4q4pz6v5zbd8blnfib9ncswcb1v6l";
};
buildInputs = [ libvorbis flac libogg libopus ];
propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ];
# There are no tests in this package.
doCheck = false;
postPatch = ''
substituteInPlace pyogg/vorbis.py --replace \
'libvorbisfile = ExternalLibrary.load("vorbisfile")' "libvorbisfile = ctypes.CDLL('${libvorbis}/lib/libvorbisfile${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/vorbis.py --replace \
'libvorbisenc = ExternalLibrary.load("vorbisenc")' "libvorbisenc = ctypes.CDLL('${libvorbis}/lib/libvorbisenc${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/vorbis.py --replace \
'libvorbis = ExternalLibrary.load("vorbis")' "libvorbis = ctypes.CDLL('${libvorbis}/lib/libvorbis${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/flac.py --replace \
'libflac = ExternalLibrary.load("flac")' "libflac = ctypes.CDLL('${flac.out}/lib/libFLAC${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/ogg.py --replace \
'libogg = ExternalLibrary.load("ogg")' "libogg = ctypes.CDLL('${libogg}/lib/libogg${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/opus.py --replace \
'libopus = ExternalLibrary.load("opus")' "libopus = ctypes.CDLL('${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/opus.py --replace \
'libopusfile = ExternalLibrary.load("opusfile")' "libopusfile = ctypes.CDLL('${opusfile}/lib/libopusfile${stdenv.hostPlatform.extensions.sharedLibrary}')"
'';
meta = {
description = "Xiph.org's Ogg Vorbis, Opus and FLAC for Python";
homepage = https://github.com/Zuzu-Typ/PyOgg;
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ pmiddend ];
};
}

View File

@ -0,0 +1,16 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "timeout-decorator";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "1bckwbi5078z3x9lyf8vl9dhx10nymwwnp46c98wm5m02x5j37g4";
};
meta = with stdenv.lib; {
description = "Timeout decorator";
license = licenses.mit;
homepage = https://github.com/pnpnpn/timeout-decorator;
};
}

View File

@ -1,20 +1,20 @@
{ stdenv, lib, fetchurl, makeWrapper, jre { stdenv, lib, fetchurl, makeWrapper, jre, gnused
, disableRemoteLogging ? true , disableRemoteLogging ? true
}: }:
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ammonite-${version}"; name = "ammonite-${version}";
version = "1.1.0"; version = "1.1.2";
scalaVersion = "2.12"; scalaVersion = "2.12";
src = fetchurl { src = fetchurl {
url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${scalaVersion}-${version}"; url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${scalaVersion}-${version}";
sha256 = "0dx5w1ffnqazsyp6zxrmfcn7yhkkd81h7njwbqqv1pbchj5znj6l"; sha256 = "1balr7ya7xlyq32jwb0w9c4klnw13mdn2c5azkwngq5cp29yrfrc";
}; };
propagatedBuildInputs = [ jre ] ; propagatedBuildInputs = [ jre ] ;
buildInputs = [ makeWrapper ] ; buildInputs = [ makeWrapper gnused ] ;
phases = "installPhase"; phases = "installPhase";
@ -22,9 +22,9 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin mkdir -p $out/bin
cp ${src} $out/bin/amm cp ${src} $out/bin/amm
chmod +x $out/bin/amm chmod +x $out/bin/amm
wrapProgram $out/bin/amm \ ${gnused}/bin/sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
${optionalString disableRemoteLogging "--add-flags --no-remote-logging"} \ '' + optionalString (disableRemoteLogging) ''
--prefix PATH ":" ${jre}/bin ; ${gnused}/bin/sed -i '0,/ammonite.Main/{s|ammonite.Main|ammonite.Main --no-remote-logging|}' $out/bin/amm
''; '';
meta = { meta = {

View File

@ -2,7 +2,7 @@
assert jdk != null; assert jdk != null;
let version = "3.5.2"; in let version = "3.5.3"; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "apache-maven-${version}"; name = "apache-maven-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "mirror://apache/maven/maven-3/${version}/binaries/${name}-bin.tar.gz"; url = "mirror://apache/maven/maven-3/${version}/binaries/${name}-bin.tar.gz";
sha256 = "1zza5kjf69hnx41gy3yhvsk1kz259nig5njcmzjbsr8a75p1yyvh"; sha256 = "0244mpziz4rw35x2cahsqlxpnygvi6qpll16g4kx87db7wvmcadm";
}; };
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];

View File

@ -8,14 +8,11 @@
let let
inherit (stdenv.lib) optional optionals; inherit (stdenv.lib) optional optionals;
sdlName = if sdlClient then "-sdl" else "";
gtkName = if gtkClient then "-gtk" else "";
name = "freeciv"; name = "freeciv";
version = "2.5.11"; version = "2.5.11";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "${name}${sdlName}${gtkName}-${version}"; name = "${name}-${version}";
inherit version; inherit version;
src = fetchurl { src = fetchurl {

View File

@ -22,9 +22,9 @@ let
COREDIR="$out/lib/retroarch/cores" COREDIR="$out/lib/retroarch/cores"
mkdir -p $out/bin mkdir -p $out/bin
mkdir -p $COREDIR mkdir -p $COREDIR
mv ${d2u core}_libretro.so $COREDIR/. mv ${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $COREDIR/.
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch-${core} \ makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch-${core} \
--add-flags "-L $COREDIR/${d2u core}_libretro.so $@" --add-flags "-L $COREDIR/${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $@"
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
@ -39,7 +39,7 @@ let
homepage = https://www.libretro.com/; homepage = https://www.libretro.com/;
inherit license; inherit license;
maintainers = with maintainers; [ edwtjo hrdinka MP2E ]; maintainers = with maintainers; [ edwtjo hrdinka MP2E ];
platforms = platforms.linux; platforms = platforms.unix;
}; };
} // a); } // a);
@ -178,7 +178,7 @@ in with stdenv.lib.licenses;
buildPhase = '' buildPhase = ''
cd svn-current/trunk \ cd svn-current/trunk \
&& make -f makefile.libretro \ && make -f makefile.libretro \
&& mv fbalpha2012_libretro.so fba_libretro.so && mv fbalpha2012_libretro${stdenv.hostPlatform.extensions.sharedLibrary} fba_libretro${stdenv.hostPlatform.extensions.sharedLibrary}
''; '';
}; };
@ -412,7 +412,7 @@ in with stdenv.lib.licenses;
}).override { }).override {
buildPhase = '' buildPhase = ''
make -f Makefile.libretro make -f Makefile.libretro
mv snes9x2010_libretro.so snes9x_next_libretro.so mv snes9x2010_libretro${stdenv.hostPlatform.extensions.sharedLibrary} snes9x_next_libretro${stdenv.hostPlatform.extensions.sharedLibrary}
''; '';
}; };

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
mkdir -p $out/lib mkdir -p $out/lib
$(for coreDir in $cores $(for coreDir in $cores
do do
$(ln -s $coreDir/*.so $out/lib/.) $(ln -s $coreDir/* $out/lib/.)
done) done)
ln -s -t $out ${retroarch}/share ln -s -t $out ${retroarch}/share

View File

@ -62,6 +62,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libnl openssl sqlite ]; buildInputs = [ libnl openssl sqlite ];
outputs = [ "out" "man" ];
extraConfig = '' extraConfig = ''
CONFIG_DRIVER_WIRED=y CONFIG_DRIVER_WIRED=y
CONFIG_LIBNL32=y CONFIG_LIBNL32=y
@ -103,6 +105,10 @@ stdenv.mkDerivation rec {
''; '';
preInstall = "mkdir -p $out/bin"; preInstall = "mkdir -p $out/bin";
postInstall = ''
install -vD hostapd.8 -t $man/share/man/man8
install -vD hostapd_cli.1 -t $man/share/man/man1
'';
meta = { meta = {
homepage = http://hostap.epitest.fi; homepage = http://hostap.epitest.fi;

View File

@ -5,9 +5,7 @@ assert stdenv.lib.versionAtLeast kernel.version "3.10";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "wireguard-${version}"; name = "wireguard-${version}";
version = "0.0.20180514"; inherit (wireguard-tools) src version;
inherit (wireguard-tools) src;
preConfigure = '' preConfigure = ''
cd src cd src
@ -28,7 +26,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.wireguard.com/; homepage = https://www.wireguard.com/;
downloadPage = https://git.zx2c4.com/WireGuard/refs/; downloadPage = https://git.zx2c4.com/WireGuard/refs/;
description = " Tools for the WireGuard secure network tunnel"; description = "Kernel module for the WireGuard secure network tunnel";
maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ]; maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ];
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.linux;

View File

@ -167,7 +167,7 @@
"lutron_caseta" = ps: with ps; [ ]; "lutron_caseta" = ps: with ps; [ ];
"matrix" = ps: with ps; [ matrix-client ]; "matrix" = ps: with ps; [ matrix-client ];
"maxcube" = ps: with ps; [ ]; "maxcube" = ps: with ps; [ ];
"media_extractor" = ps: with ps; [ ]; "media_extractor" = ps: with ps; [ youtube-dl-light ];
"media_player.anthemav" = ps: with ps; [ ]; "media_player.anthemav" = ps: with ps; [ ];
"media_player.aquostv" = ps: with ps; [ ]; "media_player.aquostv" = ps: with ps; [ ];
"media_player.blackbird" = ps: with ps; [ ]; "media_player.blackbird" = ps: with ps; [ ];
@ -276,7 +276,7 @@
"satel_integra" = ps: with ps; [ ]; "satel_integra" = ps: with ps; [ ];
"scene.hunterdouglas_powerview" = ps: with ps; [ ]; "scene.hunterdouglas_powerview" = ps: with ps; [ ];
"scsgate" = ps: with ps; [ ]; "scsgate" = ps: with ps; [ ];
"sensor.airvisual" = ps: with ps; [ ]; "sensor.airvisual" = ps: with ps; [ pyairvisual ];
"sensor.alpha_vantage" = ps: with ps; [ ]; "sensor.alpha_vantage" = ps: with ps; [ ];
"sensor.bbox" = ps: with ps; [ ]; "sensor.bbox" = ps: with ps; [ ];
"sensor.bh1750" = ps: with ps; [ ]; "sensor.bh1750" = ps: with ps; [ ];

View File

@ -25,6 +25,13 @@ GENERAL_PREFIX = '# homeassistant.'
COMPONENT_PREFIX = GENERAL_PREFIX + 'components.' COMPONENT_PREFIX = GENERAL_PREFIX + 'components.'
PKG_SET = 'python3Packages' PKG_SET = 'python3Packages'
# If some requirements are matched by multiple python packages,
# the following can be used to choose one of them
PKG_PREFERENCES = {
# Use python3Packages.youtube-dl-light instead of python3Packages.youtube-dl
'youtube-dl': 'youtube-dl-light'
}
def get_version(): def get_version():
with open(os.path.dirname(sys.argv[0]) + '/default.nix') as f: with open(os.path.dirname(sys.argv[0]) + '/default.nix') as f:
m = re.search('hassVersion = "([\\d\\.]+)";', f.read()) m = re.search('hassVersion = "([\\d\\.]+)";', f.read())
@ -59,7 +66,7 @@ output = subprocess.check_output(['nix-env', '-f', os.path.dirname(sys.argv[0])
packages = json.loads(output) packages = json.loads(output)
def name_to_attr_path(req): def name_to_attr_path(req):
attr_paths = [] attr_paths = set()
names = [req] names = [req]
# E.g. python-mpd2 is actually called python3.6-mpd2 # E.g. python-mpd2 is actually called python3.6-mpd2
# instead of python-3.6-python-mpd2 inside Nixpkgs # instead of python-3.6-python-mpd2 inside Nixpkgs
@ -71,11 +78,18 @@ def name_to_attr_path(req):
pattern = re.compile('^python\\d\\.\\d-{}-\\d'.format(name), re.I) pattern = re.compile('^python\\d\\.\\d-{}-\\d'.format(name), re.I)
for attr_path, package in packages.items(): for attr_path, package in packages.items():
if pattern.match(package['name']): if pattern.match(package['name']):
attr_paths.append(attr_path) attr_paths.add(attr_path)
if len(attr_paths) > 1:
for to_replace, replacement in PKG_PREFERENCES.items():
try:
attr_paths.remove(PKG_SET + '.' + to_replace)
attr_paths.add(PKG_SET + '.' + replacement)
except KeyError:
pass
# Let's hope there's only one derivation with a matching name # Let's hope there's only one derivation with a matching name
assert(len(attr_paths) <= 1) assert(len(attr_paths) <= 1)
if attr_paths: if len(attr_paths) == 1:
return attr_paths[0] return attr_paths.pop()
else: else:
return None return None
@ -86,14 +100,11 @@ build_inputs = {}
for component, reqs in OrderedDict(sorted(requirements.items())).items(): for component, reqs in OrderedDict(sorted(requirements.items())).items():
attr_paths = [] attr_paths = []
for req in reqs: for req in reqs:
try: name = req.split('==')[0]
name = req.split('==')[0] attr_path = name_to_attr_path(name)
attr_path = name_to_attr_path(name) if attr_path is not None:
if attr_path is not None: # Add attribute path without "python3Packages." prefix
# Add attribute path without "python3Packages." prefix attr_paths.append(attr_path[len(PKG_SET + '.'):])
attr_paths.append(attr_path[len(PKG_SET + '.'):])
except RequirementParseError:
continue
else: else:
build_inputs[component] = attr_paths build_inputs[component] = attr_paths

View File

@ -5,12 +5,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "EventStore-${version}"; name = "EventStore-${version}";
version = "4.1.0"; version = "4.1.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "EventStore"; owner = "EventStore";
repo = "EventStore"; repo = "EventStore";
rev = "oss-v${version}"; rev = "oss-v${version}";
sha256 = "0mvjz327kfg157fwvy8xkkf5h0g3v373pfwr70cslsy96n45jp10"; sha256 = "1069ncb9ps1wi71yw1fzkfd9rfsavccw8xj3a3miwd9x72w8636f";
}; };
buildPhase = '' buildPhase = ''

View File

@ -1,64 +1,53 @@
{ fetchurl, stdenv, python, bash }: { stdenv, fetchFromGitHub, python, bash }:
let stdenv.mkDerivation rec {
name = "autojump-${version}";
version = "22.5.1"; version = "22.5.1";
in
stdenv.mkDerivation rec {
name = "autojump-${version}";
src = fetchurl { src = fetchFromGitHub {
url = "http://github.com/joelthelion/autojump/archive/release-v${version}.tar.gz"; owner = "wting";
name = "autojump-${version}.tar.gz"; repo = "autojump";
sha256 = "17z9j9936x0nizwrzf664bngh60x5qbvrrf1s5qdzd0f2gdanpvn"; rev = "release-v${version}";
}; sha256 = "1l1278g3k1qfrz41pkpjdhsabassb9si2d1bfbcmvbv5h3wmlqk9";
};
buildInputs = [ python bash ]; buildInputs = [ python bash ];
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
python ./install.py -d $out -p "" python ./install.py -d "$out" -p "" -z "$out/share/zsh/site-functions/"
chmod +x $out/etc/profile.d/*
mkdir -p "$out/etc/bash_completion.d" chmod +x "$out/etc/profile.d/autojump.sh"
cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d" install -Dt "$out/share/bash-completion/completions/" -m444 "$out/share/autojump/autojump.bash"
install -Dt "$out/share/fish/vendor_conf.d/" -m444 "$out/share/autojump/autojump.fish"
install -Dt "$out/share/zsh/site-functions/" -m444 "$out/share/autojump/autojump.zsh"
'';
mkdir -p $out/share/fish/vendor_completions.d/ meta = with stdenv.lib; {
cp -v $out/share/autojump/autojump.fish "$out/share/fish/vendor_completions.d/autojump.fish" description = "A `cd' command that learns";
longDescription = ''
One of the most used shell commands is cd. A quick survey
among my friends revealed that between 10 and 20% of all
commands they type are actually cd commands! Unfortunately,
jumping from one part of your system to another with cd
requires to enter almost the full path, which isnt very
practical and requires a lot of keystrokes.
cat <<SCRIPT > $out/bin/autojump-share Autojump is a faster way to navigate your filesystem. It
#!/bin/sh works by maintaining a database of the directories you use the
# Run this script to find the autojump shared folder where all the shell most from the command line. The jstat command shows you the
# integration scripts are living. current contents of the database. You need to work a little
echo $out/share/autojump bit before the database becomes usable. Once your database
SCRIPT is reasonably complete, you can jump to a directory by
chmod +x $out/bin/autojump-share typing "j dirspec", where dirspec is a few characters of the
directory you want to jump to. It will jump to the most used
directory whose name matches the pattern given in dirspec.
Autojump supports tab-completion.
''; '';
homepage = http://wiki.github.com/wting/autojump;
meta = { license = licenses.gpl3;
description = "A `cd' command that learns"; platforms = platforms.all;
longDescription = '' maintainers = with maintainers; [ domenkozar yurrriq ];
One of the most used shell commands is cd. A quick survey };
among my friends revealed that between 10 and 20% of all }
commands they type are actually cd commands! Unfortunately,
jumping from one part of your system to another with cd
requires to enter almost the full path, which isnt very
practical and requires a lot of keystrokes.
Autojump is a faster way to navigate your filesystem. It
works by maintaining a database of the directories you use the
most from the command line. The jstat command shows you the
current contents of the database. You need to work a little
bit before the database becomes usable. Once your database
is reasonably complete, you can jump to a directory by
typing "j dirspec", where dirspec is a few characters of the
directory you want to jump to. It will jump to the most used
directory whose name matches the pattern given in dirspec.
Autojump supports tab-completion.
'';
homepage = http://wiki.github.com/joelthelion/autojump;
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.domenkozar ];
};
}

View File

@ -1,26 +1,36 @@
{ mkDerivation, fetchurl, lib { mkDerivation, fetchurl, lib
, extra-cmake-modules, kdoctools, wrapGAppsHook , extra-cmake-modules, kdoctools, wrapGAppsHook
, kconfig, kcrash, kinit, kpmcore , kconfig, kcrash, kinit, kpmcore
, eject, libatasmart }: , eject, libatasmart , utillinux, makeWrapper, qtbase
}:
let let
pname = "partitionmanager"; pname = "partitionmanager";
in mkDerivation rec { in mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
version = "3.0.1"; version = "3.3.1";
src = fetchurl { src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "08sb9xa7dvvgha3k2xm1srl339przxpxd2y5bh1lnx6k1x7dk410"; sha256 = "0jhggb4xksb0k0mj752n6pz0xmccnbzlp984xydqbz3hkigra1si";
}; };
enableParallelBuilding = true;
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook makeWrapper ];
# refer to kpmcore for the use of eject
buildInputs = [ eject libatasmart utillinux ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
postInstall = ''
wrapProgram "$out/bin/partitionmanager" --prefix QT_PLUGIN_PATH : "${kpmcore}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
'';
meta = with lib; { meta = with lib; {
description = "KDE Partition Manager"; description = "KDE Partition Manager";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ]; homepage = https://www.kde.org/applications/system/kdepartitionmanager/;
maintainers = with maintainers; [ peterhoeg ma27 ];
}; };
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
# refer to kpmcore for the use of eject
buildInputs = [ eject libatasmart ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
} }

View File

@ -1,4 +1,4 @@
{ stdenv, targetPlatform, fetchurl, buildPythonApplication { stdenv, targetPlatform, fetchurl, buildPythonPackage
, zip, ffmpeg, rtmpdump, phantomjs2, atomicparsley, pycryptodome, pandoc , zip, ffmpeg, rtmpdump, phantomjs2, atomicparsley, pycryptodome, pandoc
# Pandoc is required to build the package's man page. Release tarballs contain a # Pandoc is required to build the package's man page. Release tarballs contain a
# formatted man page already, though, it will still be installed. We keep the # formatted man page already, though, it will still be installed. We keep the
@ -13,7 +13,7 @@
, makeWrapper }: , makeWrapper }:
with stdenv.lib; with stdenv.lib;
buildPythonApplication rec { buildPythonPackage rec {
pname = "youtube-dl"; pname = "youtube-dl";
version = "2018.05.18"; version = "2018.05.18";

View File

@ -2,13 +2,13 @@
buildGoPackage rec { buildGoPackage rec {
name = "wireguard-go-${version}"; name = "wireguard-go-${version}";
version = "0.0.20180514"; version = "0.0.20180519";
goPackagePath = "wireguard-go"; goPackagePath = "wireguard-go";
src = fetchzip { src = fetchzip {
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz"; url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "1i1w4vj8w353b92nfhs92k0f7fifrwi067qfmgckdk0kk76nv2id"; sha256 = "0b3wpc0ccf24567fjafv1sjs3yqq1xjam3gpfp37avxqy9789nb7";
}; };
goDeps = ./deps.nix; goDeps = ./deps.nix;
@ -22,7 +22,7 @@ buildGoPackage rec {
description = "Userspace Go implementation of WireGuard"; description = "Userspace Go implementation of WireGuard";
homepage = https://git.zx2c4.com/wireguard-go/about/; homepage = https://git.zx2c4.com/wireguard-go/about/;
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ kirelagin ]; maintainers = with maintainers; [ kirelagin zx2c4 ];
platforms = with platforms; linux ++ darwin ++ windows; platforms = platforms.darwin;
}; };
} }

View File

@ -1,46 +1,44 @@
{ stdenv, lib, fetchzip, libmnl, useSystemd ? stdenv.isLinux }: { stdenv, fetchzip, libmnl ? null, makeWrapper ? null, wireguard-go ? null }:
let with stdenv.lib;
inherit (lib) optional optionalString;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "wireguard-tools-${version}"; name = "wireguard-tools-${version}";
version = "0.0.20180519"; version = "0.0.20180519";
src = fetchzip { src = fetchzip {
url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz"; url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz";
sha256 = "0pd04ia0wcm0f6di4gx5kflccc5j35d72j38l8jqpj8vinl6l070"; sha256 = "0pd04ia0wcm0f6di4gx5kflccc5j35d72j38l8jqpj8vinl6l070";
}; };
preConfigure = "cd src"; sourceRoot = "source/src/tools";
buildInputs = optional stdenv.isLinux libmnl; nativeBuildInputs = [ (optional stdenv.isDarwin makeWrapper) ];
buildInputs = [ (optional stdenv.isLinux libmnl) ];
enableParallelBuilding = true;
makeFlags = [ makeFlags = [
"WITH_BASHCOMPLETION=yes"
"WITH_WGQUICK=yes"
"WITH_SYSTEMDUNITS=${if useSystemd then "yes" else "no"}"
"DESTDIR=$(out)" "DESTDIR=$(out)"
"PREFIX=/" "PREFIX=/"
"-C" "tools" "WITH_BASHCOMPLETION=yes"
"WITH_SYSTEMDUNITS=yes"
"WITH_WGQUICK=yes"
]; ];
buildPhase = "make tools"; postFixup = ''
postInstall = optionalString useSystemd ''
substituteInPlace $out/lib/systemd/system/wg-quick@.service \ substituteInPlace $out/lib/systemd/system/wg-quick@.service \
--replace /usr/bin $out/bin --replace /usr/bin $out/bin
'' + optionalString stdenv.isDarwin ''
for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${wireguard-go}/bin
done
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.wireguard.com/; description = "Tools for the WireGuard secure network tunnel";
downloadPage = https://git.zx2c4.com/WireGuard/refs/; downloadPage = https://git.zx2c4.com/WireGuard/refs/;
description = " Tools for the WireGuard secure network tunnel"; homepage = https://www.wireguard.com/;
maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ]; license = licenses.gpl2;
license = licenses.gpl2; maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, rustPlatform, nix, boost, graphviz }:
rustPlatform.buildRustPackage rec {
name = "nix-du-${version}";
version = "0.1.1";
src = fetchFromGitHub {
owner = "symphorien";
repo = "nix-du";
rev = "v${version}";
sha256 = "0kxacn5qw21pp4zl6wr9wyb2mm2nlnp6mla3m5p9dm7vrm1fd1x9";
};
cargoSha256 = "04c48lzi7hny3nq4ffdpvsr4dxbi32faka163fp1yc9953zdw9az";
doCheck = !stdenv.isDarwin;
checkInputs = [ graphviz ];
nativeBuildInputs = [] ++ stdenv.lib.optionals doCheck checkInputs;
buildInputs = [
boost
nix
];
meta = with stdenv.lib; {
description = "A tool to determine which gc-roots take space in your nix store";
homepage = https://github.com/symphorien/nix-du;
license = licenses.lgpl3;
maintainers = [ maintainers.symphorien ];
platforms = platforms.all;
};
}

View File

@ -7433,7 +7433,9 @@ with pkgs;
spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { }; spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { }; spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { };
spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { }; spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { };
spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix { }; spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix {
inherit (darwin) libobjc;
};
spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { }; spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { };
spidermonkey = spidermonkey_31; spidermonkey = spidermonkey_31;
@ -11508,7 +11510,9 @@ with pkgs;
simpleitk = callPackage ../development/libraries/simpleitk { lua = lua51Packages.lua; }; simpleitk = callPackage ../development/libraries/simpleitk { lua = lua51Packages.lua; };
sfml = callPackage ../development/libraries/sfml { }; sfml = callPackage ../development/libraries/sfml {
inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL;
};
csfml = callPackage ../development/libraries/csfml { }; csfml = callPackage ../development/libraries/csfml { };
shapelib = callPackage ../development/libraries/shapelib { }; shapelib = callPackage ../development/libraries/shapelib { };
@ -14802,8 +14806,9 @@ with pkgs;
gconf = gnome2.GConf; gconf = gnome2.GConf;
}; };
atom = callPackage ../applications/editors/atom { }; atomPackages = callPackage ../applications/editors/atom { };
atom-beta = callPackage ../applications/editors/atom/beta.nix { };
inherit (atomPackages) atom atom-beta;
aseprite = callPackage ../applications/editors/aseprite { }; aseprite = callPackage ../applications/editors/aseprite { };
aseprite-unfree = aseprite.override { unfree = true; }; aseprite-unfree = aseprite.override { unfree = true; };
@ -14980,7 +14985,6 @@ with pkgs;
bombono = callPackage ../applications/video/bombono {}; bombono = callPackage ../applications/video/bombono {};
bomi = libsForQt5.callPackage ../applications/video/bomi { bomi = libsForQt5.callPackage ../applications/video/bomi {
youtube-dl = pythonPackages.youtube-dl;
pulseSupport = config.pulseaudio or true; pulseSupport = config.pulseaudio or true;
ffmpeg = ffmpeg_2; ffmpeg = ffmpeg_2;
}; };
@ -16910,7 +16914,6 @@ with pkgs;
mpv = callPackage ../applications/video/mpv rec { mpv = callPackage ../applications/video/mpv rec {
inherit (luaPackages) luasocket; inherit (luaPackages) luasocket;
youtube-dl = pythonPackages.youtube-dl;
waylandSupport = stdenv.isLinux; waylandSupport = stdenv.isLinux;
alsaSupport = !stdenv.isDarwin; alsaSupport = !stdenv.isDarwin;
pulseSupport = !stdenv.isDarwin; pulseSupport = !stdenv.isDarwin;
@ -17336,6 +17339,8 @@ with pkgs;
purple-vk-plugin = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin { }; purple-vk-plugin = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin { };
purple-xmpp-http-upload = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload { };
telegram-purple = callPackage ../applications/networking/instant-messengers/pidgin-plugins/telegram-purple { }; telegram-purple = callPackage ../applications/networking/instant-messengers/pidgin-plugins/telegram-purple { };
toxprpl = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tox-prpl { toxprpl = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tox-prpl {
@ -18824,7 +18829,9 @@ with pkgs;
yoshimi = callPackage ../applications/audio/yoshimi { }; yoshimi = callPackage ../applications/audio/yoshimi { };
inherit (pythonPackages) youtube-dl; youtube-dl = with pythonPackages; toPythonApplication youtube-dl;
youtube-dl-light = with pythonPackages; toPythonApplication youtube-dl-light;
youtube-viewer = perlPackages.WWWYoutubeViewer; youtube-viewer = perlPackages.WWWYoutubeViewer;
@ -20765,6 +20772,8 @@ with pkgs;
nix-deploy = haskell.lib.justStaticExecutables haskellPackages.nix-deploy; nix-deploy = haskell.lib.justStaticExecutables haskellPackages.nix-deploy;
nix-diff = haskell.lib.justStaticExecutables haskellPackages.nix-diff; nix-diff = haskell.lib.justStaticExecutables haskellPackages.nix-diff;
nix-du = callPackage ../tools/package-management/nix-du { };
nix-info = callPackage ../tools/nix/info { }; nix-info = callPackage ../tools/nix/info { };
nix-info-tested = nix-info.override { doCheck = true; }; nix-info-tested = nix-info.override { doCheck = true; };

View File

@ -319,6 +319,8 @@ in {
pyaes = callPackage ../development/python-modules/pyaes { }; pyaes = callPackage ../development/python-modules/pyaes { };
pyairvisual = callPackage ../development/python-modules/pyairvisual { };
pyamf = callPackage ../development/python-modules/pyamf { }; pyamf = callPackage ../development/python-modules/pyamf { };
pyarrow = callPackage ../development/python-modules/pyarrow { pyarrow = callPackage ../development/python-modules/pyarrow {
@ -13039,15 +13041,7 @@ in {
}; };
}; };
timeout-decorator = buildPythonPackage rec { timeout-decorator = callPackage ../development/python-modules/timeout-decorator { };
name = "timeout-decorator-${version}";
version = "0.3.2";
src = pkgs.fetchurl {
url = "http://pypi.python.org/packages/source/t/timeout-decorator/${name}.tar.gz";
sha256 = "1x9l8bwdk72if2d5h5mi4lcaidbsmyh0iz114cfyyj1rzz5rxqaf";
};
};
pid = buildPythonPackage rec { pid = buildPythonPackage rec {
name = "pid-${version}"; name = "pid-${version}";
@ -18183,6 +18177,8 @@ EOF
prometheus_client = callPackage ../development/python-modules/prometheus_client { }; prometheus_client = callPackage ../development/python-modules/prometheus_client { };
pysdl2 = callPackage ../development/python-modules/pysdl2 { }; pysdl2 = callPackage ../development/python-modules/pysdl2 { };
pyogg = callPackage ../development/python-modules/pyogg { };
}); });
in fix' (extends overrides packages) in fix' (extends overrides packages)