diff options
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rwxr-xr-x | maintainers/scripts/nix-generate-from-cpan.pl | 6 | ||||
-rw-r--r-- | pkgs/applications/misc/keepass/default.nix | 28 | ||||
-rwxr-xr-x | pkgs/applications/misc/keepass/extractWinRscIconsToStdFreeDesktopDir.sh | 61 | ||||
-rw-r--r-- | pkgs/applications/misc/khal/default.nix | 7 | ||||
-rw-r--r-- | pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/default.nix | 9 | ||||
-rw-r--r-- | pkgs/desktops/kde-5/plasma-5.5/srcs.nix | 8 | ||||
-rw-r--r-- | pkgs/development/compilers/ghdl/default.nix | 46 | ||||
-rw-r--r-- | pkgs/os-specific/linux/musl/default.nix | 4 | ||||
-rw-r--r-- | pkgs/stdenv/linux/make-bootstrap-tools.nix | 10 | ||||
-rw-r--r-- | pkgs/tools/networking/connman_dmenu/default.nix | 34 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
13 files changed, 159 insertions, 59 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 5de6a21572c..7362c6ab659 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -167,6 +167,7 @@ joelmo = "Joel Moberg <joel.moberg@gmail.com>"; joelteon = "Joel Taylor <me@joelt.io>"; jpbernardy = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>"; + jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>"; jwiegley = "John Wiegley <johnw@newartisans.com>"; jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>"; jzellner = "Jeff Zellner <jeffz@eml.cc>"; diff --git a/maintainers/scripts/nix-generate-from-cpan.pl b/maintainers/scripts/nix-generate-from-cpan.pl index f1159c6d290..73e13bfe09a 100755 --- a/maintainers/scripts/nix-generate-from-cpan.pl +++ b/maintainers/scripts/nix-generate-from-cpan.pl @@ -279,7 +279,7 @@ sub get_deps { next if $n eq "perl"; # Hacky way to figure out if this module is part of Perl. - if ( $n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/ ) { + if ( $n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/ && $n !~ /^if$/ ) { eval "use $n;"; if ( !$@ ) { DEBUG("skipping Perl-builtin module $n"); @@ -431,7 +431,7 @@ my $build_fun = -e "$pkg_path/Build.PL" print STDERR "===\n"; print <<EOF; - "$attr_name" = $build_fun rec { + ${\(is_reserved($attr_name) ? "\"$attr_name\"" : $attr_name)} = $build_fun rec { name = "$pkg_name"; src = fetchurl { url = "mirror://cpan/${\$module->path}/\${name}.${\$module->package_extension}"; @@ -450,7 +450,7 @@ EOF print <<EOF if defined $homepage; homepage = $homepage; EOF -print <<EOF if defined $description; +print <<EOF if defined $description && $description ne "Unknown"; description = "$description"; EOF print <<EOF if defined $license; diff --git a/pkgs/applications/misc/keepass/default.nix b/pkgs/applications/misc/keepass/default.nix index 8f16283d391..948d03262b6 100644 --- a/pkgs/applications/misc/keepass/default.nix +++ b/pkgs/applications/misc/keepass/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, plugins ? [] }: +{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, icoutils, plugins ? [] }: # KeePass looks for plugins in under directory in which KeePass.exe is # located. It follows symlinks where looking for that directory, so @@ -17,7 +17,7 @@ with builtins; buildDotnetPackage rec { sourceRoot = "."; - buildInputs = [ unzip makeWrapper ]; + buildInputs = [ unzip makeWrapper icoutils ]; pluginLoadPathsPatch = let outputLc = toString (add 8 (length plugins)); @@ -52,9 +52,14 @@ with builtins; buildDotnetPackage rec { name = "keepass"; exec = "keepass"; comment = "Password manager"; + icon = "keepass"; desktopName = "Keepass"; genericName = "Password manager"; - categories = "Application;Other;"; + categories = "Application;Utility;"; + mimeType = stdenv.lib.concatStringsSep ";" [ + "application/x-keepass2" + "" + ]; }; outputFiles = [ "Build/KeePass/Release/*" "Build/KeePassLib/Release/*" ]; @@ -67,16 +72,29 @@ with builtins; buildDotnetPackage rec { # is found and does not pollute output path. binPaths = lib.concatStrings (lib.intersperse ":" (map (x: x + "/bin") plugins)); - postInstall = '' + postInstall = + let + extractFDeskIcons = ./extractWinRscIconsToStdFreeDesktopDir.sh; + in + '' mkdir -p "$out/share/applications" cp ${desktopItem}/share/applications/* $out/share/applications wrapProgram $out/bin/keepass --prefix PATH : "$binPaths" + + ${extractFDeskIcons} \ + "./Translation/TrlUtil/Resources/KeePass.ico" \ + '[^\.]+_[0-9]+_([0-9]+x[0-9]+)x[0-9]+\.png' \ + '\1' \ + '([^\.]+).+' \ + 'keepass' \ + "$out" \ + "./tmp" ''; meta = { description = "GUI password manager with strong cryptography"; homepage = http://www.keepass.info/; - maintainers = with stdenv.lib.maintainers; [ amorsillo obadz ]; + maintainers = with stdenv.lib.maintainers; [ amorsillo obadz jraygauthier ]; platforms = with stdenv.lib.platforms; all; license = stdenv.lib.licenses.gpl2; }; diff --git a/pkgs/applications/misc/keepass/extractWinRscIconsToStdFreeDesktopDir.sh b/pkgs/applications/misc/keepass/extractWinRscIconsToStdFreeDesktopDir.sh new file mode 100755 index 00000000000..04485b146a0 --- /dev/null +++ b/pkgs/applications/misc/keepass/extractWinRscIconsToStdFreeDesktopDir.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +# The file from which to extract *.ico files. +#rscFile="./KeePass.exe" +rscFile=$1 + +# A regexp that can extract the image size from the file name. +# sizeRegex='[^\.]+\.exe_[0-9]+_[0-9]+_[0-9]+_[0-9]+_([0-9]+x[0-9]+)x[0-9]+\.png' +sizeRegex=$2 + +# sizeReplaceExp='\1' +sizeReplaceExp=$3 + +# A regexp that can extract the name of the target image from the file name. +# nameRegex='([^\.]+)\.exe.+' +nameRegex=$4 + +# nameReplaceExp='\1' +nameReplaceExp=$5 + +# out=./myOut +out=$6 + +# An optional temp dir. TODO: Generate it randomly by default instead. +tmp=./tmp +if [ "" != "$4" ]; then + tmp=$7 +fi + + + +rm -rf $tmp/png $tmp/ico +mkdir -p $tmp/png $tmp/ico + +# Extract the ressource file's extension. +rscFileExt=`echo "$rscFile" | sed -re 's/.+\.(.+)$/\1/'` + +# Debug ressource file extension. +echo "rscFileExt=$rscFileExt" + +if [ "ico" = "$rscFileExt" ]; then + cp -p $rscFile $tmp/ico +else + wrestool -x --output=$tmp/ico -t14 $rscFile +fi + +icotool --icon -x --palette-size=0 -o $tmp/png $tmp/ico/*.ico + +mkdir -p $out + +for i in $tmp/png/*.png; do + fn=`basename "$i"` + size=$(echo $fn | sed -re 's/'${sizeRegex}'/'${sizeReplaceExp}'/') + name=$(echo $fn | sed -re 's/'${nameRegex}'/'${nameReplaceExp}'/') + targetDir=$out/share/icons/hicolor/$size/apps + targetFile=$targetDir/$name.png + mkdir -p $targetDir + mv $i $targetFile +done + +rm -rf $tmp/png $tmp/ico diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix index 52a4f0dee75..ab55e3618ec 100644 --- a/pkgs/applications/misc/khal/default.nix +++ b/pkgs/applications/misc/khal/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, pkgs, pythonPackages }: +{ stdenv, fetchurl, pkgs, python3Packages }: -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { version = "0.7.0"; name = "khal-${version}"; @@ -9,7 +9,7 @@ pythonPackages.buildPythonApplication rec { sha256 = "00llxj7cv31mjsx0j6zxmyi9s1q20yvfkn025xcy8cv1ylfwic66"; }; - propagatedBuildInputs = with pythonPackages; [ + propagatedBuildInputs = with python3Packages; [ atomicwrites click configobj @@ -22,7 +22,6 @@ pythonPackages.buildPythonApplication rec { requests_toolbelt tzlocal urwid - python.modules.sqlite3 pkginfo ]; diff --git a/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix b/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix index 588c7acff7c..512a8938a58 100644 --- a/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { rev = "e716a9e1a9e460a45663694ba4e9e8894a8452b2"; - version = "v0.2-e716a9e1a9e460a45663694ba4e9e8894a8452b2"; + version = "0.2-${rev}"; name = "git-remote-hg-${version}"; src = fetchgit { diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 5bc2eee2414..a38ab6e9b3d 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -21,6 +21,7 @@ , youtubeSupport ? true, youtube-dl ? null , cacaSupport ? true, libcaca ? null , vaapiSupport ? false, libva ? null +, waylandSupport ? false, wayland ? null, libxkbcommon ? null }: assert x11Support -> (libX11 != null && libXext != null && mesa != null && libXxf86vm != null); @@ -41,6 +42,7 @@ assert bs2bSupport -> libbs2b != null; assert libpngSupport -> libpng != null; assert youtubeSupport -> youtube-dl != null; assert cacaSupport -> libcaca != null; +assert waylandSupport -> (wayland != null && libxkbcommon != null); let inherit (stdenv.lib) optional optionals optionalString; @@ -77,7 +79,8 @@ stdenv.mkDerivation rec { "--enable-manpage-build" "--disable-build-date" # Purity "--enable-zsh-comp" - ] ++ optional vaapiSupport "--enable-vaapi"; + ] ++ optional vaapiSupport "--enable-vaapi" + ++ optional waylandSupport "--enable-wayland"; configurePhase = '' python ${waf} configure --prefix=$out $configureFlags @@ -105,7 +108,8 @@ stdenv.mkDerivation rec { ++ optional youtubeSupport youtube-dl ++ optional sdl2Support SDL2 ++ optional cacaSupport libcaca - ++ optional vaapiSupport libva; + ++ optional vaapiSupport libva + ++ optionals waylandSupport [ wayland libxkbcommon ]; enableParallelBuilding = true; @@ -139,6 +143,5 @@ stdenv.mkDerivation rec { ''; }; } -# TODO: Wayland support # TODO: investigate caca support # TODO: investigate lua5_sockets bug diff --git a/pkgs/desktops/kde-5/plasma-5.5/srcs.nix b/pkgs/desktops/kde-5/plasma-5.5/srcs.nix index 40fe5618ff8..f27b39033e2 100644 --- a/pkgs/desktops/kde-5/plasma-5.5/srcs.nix +++ b/pkgs/desktops/kde-5/plasma-5.5/srcs.nix @@ -251,11 +251,11 @@ }; }; plasma-workspace = { - version = "5.5.5.1"; + version = "5.5.5.2"; src = fetchurl { - url = "${mirror}/stable/plasma/5.5.5/plasma-workspace-5.5.5.1.tar.xz"; - sha256 = "1grhw60rd5dl07fl0dr96fq6c6d7076k5m2hjg6w6w9ynb76sg6h"; - name = "plasma-workspace-5.5.5.1.tar.xz"; + url = "${mirror}/stable/plasma/5.5.5/plasma-workspace-5.5.5.2.tar.xz"; + sha256 = "09kvzv2cjlv0bglik7723m373nvhvh3c4aaip2xkv5lbhxfydldy"; + name = "plasma-workspace-5.5.5.2.tar.xz"; }; }; plasma-workspace-wallpapers = { diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix index 7b2e03f8d57..3e84ce1d0ae 100644 --- a/pkgs/development/compilers/ghdl/default.nix +++ b/pkgs/development/compilers/ghdl/default.nix @@ -1,58 +1,28 @@ { stdenv, fetchurl, gnat, zlib }: +# I think that mcode can only generate x86 code, +# so it fails to link pieces on x86_64. assert stdenv.system == "i686-linux"; let - version = "0.31"; + version = "0.33"; in stdenv.mkDerivation rec { name = "ghdl-mcode-${version}"; src = fetchurl { - url = "mirror://sourceforge/ghdl/ghdl-${version}.tar.gz"; - sha256 = "1v0l9h6906b0bvnwfi2qg5nz9vjg80isc5qgjxr1yqxpkfm2xcf0"; + url = "https://github.com/tgingold/ghdl/archive/v${version}.tar.gz"; + sha256 = "09yvgqyglbakd74v2dgr470clzm744i232nixyffcds55vkij5da"; }; buildInputs = [ gnat zlib ]; - # Tarbomb - preUnpack = '' - mkdir ghdl - cd ghdl - ''; - - sourceRoot = "translate/ghdldrv"; - patchPhase = '' - sed -i 's,$$curdir/lib,'$out'/share/ghdl_mcode/translate/lib,' Makefile - ''; - - postBuild = '' - # Build the LIB - ln -s ghdl_mcode ghdl - make install.mcode + # Disable warnings-as-errors, because there are warnings (unused things) + sed -i s/-gnatwae/-gnatwa/ Makefile.in ghdl.gpr.in ''; - installPhase = '' - mkdir -p $out/bin - cp ghdl_mcode $out/bin - - mkdir -p $out/share/ghdl_mcode/translate - cp -R ../lib $out/share/ghdl_mcode/translate - cp -R ../../libraries $out/share/ghdl_mcode - - mkdir -p $out/share/man/man1 - cp ../../doc/ghdl.1 $out/share/man/man1/ghdl_mcode.1 - - # Ghdl has some timestamps checks, storing file timestamps in '.cf' files. - # As we will change the timestamps to 1970-01-01 00:00:01, we also set the - # content of that .cf to that value. This way ghdl does not complain on - # the installed object files from the basic libraries (ieee, ...) - pushd $out - find . -name "*.cf" -exec \ - sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \; - popd - ''; + enableParallelBuilding = true; meta = { homepage = "http://sourceforge.net/p/ghdl-updates/wiki/Home/"; diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index abe96e9b9ae..a8055df92fd 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + preConfigure = '' + configureFlagsArray+=("--syslibdir=$out/lib") + ''; + configureFlags = [ "--enable-shared" "--enable-static" diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index ef651f64368..3c894869972 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -51,7 +51,15 @@ rec { cp -d ${glibc}/lib/crt?.o $out/lib cp -rL ${glibc}/include $out - chmod -R u+w $out/include + chmod -R u+w "$out" + + # glibc can contain linker scripts: find them, copy their deps, + # and get rid of absolute paths (nuke-refs would make them useless) + local lScripts=$(grep --files-with-matches --max-count=1 'GNU ld script' -R "$out/lib") + cp -d -t "$out/lib/" $(cat $lScripts | tr " " "\n" | grep -F '${glibc}' | sort -u) + for f in $lScripts; do + substituteInPlace "$f" --replace '${glibc}/lib/' "" + done # Hopefully we won't need these. rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video diff --git a/pkgs/tools/networking/connman_dmenu/default.nix b/pkgs/tools/networking/connman_dmenu/default.nix new file mode 100644 index 00000000000..42ef7f4f4da --- /dev/null +++ b/pkgs/tools/networking/connman_dmenu/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, connman, dmenu }: +stdenv.mkDerivation rec { + name = "connman_dmenu-${version}"; + version = "git-29-9-2015"; + + src = fetchFromGitHub { + owner = "march-linux"; + repo = "connman_dmenu"; + rev = "cc89fec40b574b0d234afeb70ea3c94626ca3f5c"; + sha256 = "061fi83pai4n19l9d7wq6wwj2d7cixwkhkh742c5ibmw1wb274yk"; + }; + + buildInputs = [ connman dmenu ]; + + phases = "unpackPhase patchPhase installPhase fixupPhase"; + + # remove root requirement, see: https://github.com/march-linux/connman_dmenu/issues/3 + patchPhase = '' + sed -i '89,92d' connman_dmenu + ''; + + installPhase = '' + mkdir -p $out/bin + cp connman_dmenu $out/bin/ + ''; + + meta = { + description = "A dmenu wrapper for connmann"; + homepage = https://github.com/march-linux/connman_dmenu; + license = stdenv.lib.licenses.free; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59da78dacf2..9d45632c4e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1150,6 +1150,8 @@ let connmanui = callPackage ../tools/networking/connmanui { }; + connman_dmenu = callPackage ../tools/networking/connman_dmenu { }; + convertlit = callPackage ../tools/text/convertlit { }; collectd = callPackage ../tools/system/collectd { |