Merge pull request #49864 from oxij/pkgs/tiny-things

trivial: tiny cleanups and fixes
This commit is contained in:
Michael Raskin 2018-11-08 06:28:10 +00:00 committed by GitHub
commit adf41ed942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 29 additions and 26 deletions

View File

@ -73,7 +73,7 @@ rec {
# Get the commit id of a git repo # Get the commit id of a git repo
# Example: commitIdFromGitRepo <nixpkgs/.git> # Example: commitIdFromGitRepo <nixpkgs/.git>
commitIdFromGitRepo = commitIdFromGitRepo =
let readCommitFromFile = path: file: let readCommitFromFile = file: path:
with builtins; with builtins;
let fileName = toString path + "/" + file; let fileName = toString path + "/" + file;
packedRefsName = toString path + "/packed-refs"; packedRefsName = toString path + "/packed-refs";
@ -85,7 +85,7 @@ rec {
matchRef = match "^ref: (.*)$" fileContent; matchRef = match "^ref: (.*)$" fileContent;
in if isNull matchRef in if isNull matchRef
then fileContent then fileContent
else readCommitFromFile path (lib.head matchRef) else readCommitFromFile (lib.head matchRef) path
# Sometimes, the file isn't there at all and has been packed away in the # Sometimes, the file isn't there at all and has been packed away in the
# packed-refs file, so we have to grep through it: # packed-refs file, so we have to grep through it:
else if lib.pathExists packedRefsName else if lib.pathExists packedRefsName
@ -96,7 +96,7 @@ rec {
then throw ("Could not find " + file + " in " + packedRefsName) then throw ("Could not find " + file + " in " + packedRefsName)
else lib.head matchRef else lib.head matchRef
else throw ("Not a .git directory: " + path); else throw ("Not a .git directory: " + path);
in lib.flip readCommitFromFile "HEAD"; in readCommitFromFile "HEAD";
pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir); pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir);

View File

@ -45,6 +45,7 @@ let
system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev; system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev;
}; };
makeModules = module: rest: [ configuration versionModule module rest ];
makeIso = makeIso =
{ module, type, system, ... }: { module, type, system, ... }:
@ -53,7 +54,9 @@ let
hydraJob ((import lib/eval-config.nix { hydraJob ((import lib/eval-config.nix {
inherit system; inherit system;
modules = [ configuration module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ]; modules = makeModules module {
isoImage.isoBaseName = "nixos-${type}";
};
}).config.system.build.isoImage); }).config.system.build.isoImage);
@ -64,7 +67,7 @@ let
hydraJob ((import lib/eval-config.nix { hydraJob ((import lib/eval-config.nix {
inherit system; inherit system;
modules = [ configuration module versionModule ]; modules = makeModules module {};
}).config.system.build.sdImage); }).config.system.build.sdImage);
@ -77,7 +80,7 @@ let
config = (import lib/eval-config.nix { config = (import lib/eval-config.nix {
inherit system; inherit system;
modules = [ configuration module versionModule ]; modules = makeModules module {};
}).config; }).config;
tarball = config.system.build.tarball; tarball = config.system.build.tarball;
@ -97,7 +100,7 @@ let
buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix { buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix {
inherit system; inherit system;
modules = [ configuration module versionModule ] ++ singleton modules = makeModules module
({ ... }: ({ ... }:
{ fileSystems."/".device = mkDefault "/dev/sda1"; { fileSystems."/".device = mkDefault "/dev/sda1";
boot.loader.grub.device = mkDefault "/dev/sda"; boot.loader.grub.device = mkDefault "/dev/sda";
@ -108,7 +111,7 @@ let
let let
configEvaled = import lib/eval-config.nix { configEvaled = import lib/eval-config.nix {
inherit system; inherit system;
modules = [ module versionModule ]; modules = makeModules module {};
}; };
build = configEvaled.config.system.build; build = configEvaled.config.system.build;
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget;

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak"; description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak";
homepage = https://github.com/espeak-ng/espeak-ng; homepage = src.meta.homepage;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [ aske ]; maintainers = with maintainers; [ aske ];
platforms = platforms.linux; platforms = platforms.linux;

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bastibl"; owner = "bastibl";
repo = "gr-rds"; repo = "gr-rds";
rev = "$v{version}"; rev = "v${version}";
sha256 = "008284ya464q4h4fd0zvcn6g7bym231p8fl3kdxncz9ks4zsbsxs"; sha256 = "008284ya464q4h4fd0zvcn6g7bym231p8fl3kdxncz9ks4zsbsxs";
}; };

View File

@ -18,7 +18,7 @@
## optional libraries ## optional libraries
, alsaSupport ? stdenv.isLinux, alsaLib , alsaSupport ? stdenv.isLinux, alsaLib
, pulseaudioSupport ? true, libpulseaudio , pulseaudioSupport ? stdenv.isLinux, libpulseaudio
, ffmpegSupport ? true, gstreamer, gst-plugins-base , ffmpegSupport ? true, gstreamer, gst-plugins-base
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook , gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
, gssSupport ? true, kerberos , gssSupport ? true, kerberos

View File

@ -25,20 +25,20 @@
with stdenv.lib; with stdenv.lib;
if ! lists.elem stdenv.hostPlatform.system platforms.mesaPlatforms then if ! elem stdenv.hostPlatform.system platforms.mesaPlatforms then
throw "unsupported platform for Mesa" throw "unsupported platform for Mesa"
else else
let let
defaultGalliumDrivers = defaultGalliumDrivers =
optionals (builtins.elem "drm" eglPlatforms) optionals (elem "drm" eglPlatforms)
(if stdenv.isAarch32 (if stdenv.isAarch32
then ["virgl" "nouveau" "freedreno" "vc4" "etnaviv" "imx"] then ["virgl" "nouveau" "freedreno" "vc4" "etnaviv" "imx"]
else if stdenv.isAarch64 else if stdenv.isAarch64
then ["virgl" "nouveau" "vc4" ] then ["virgl" "nouveau" "vc4" ]
else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"]); else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"]);
defaultDriDrivers = defaultDriDrivers =
optionals (builtins.elem "drm" eglPlatforms) optionals (elem "drm" eglPlatforms)
(if (stdenv.isAarch32 || stdenv.isAarch64) (if (stdenv.isAarch32 || stdenv.isAarch64)
then ["nouveau"] then ["nouveau"]
else ["i915" "i965" "nouveau" "radeon" "r200"]); else ["i915" "i965" "nouveau" "radeon" "r200"]);

View File

@ -33,7 +33,7 @@ let
qtCompatVersion = "5.11"; qtCompatVersion = "5.11";
mirror = "http://download.qt.io"; mirror = "https://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // { srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
# Community port of the now unmaintained upstream qtwebkit. # Community port of the now unmaintained upstream qtwebkit.
qtwebkit = { qtwebkit = {

View File

@ -18,7 +18,7 @@
withGtk3 ? false, dconf ? null, gtk3 ? null, withGtk3 ? false, dconf ? null, gtk3 ? null,
# options # options
libGLSupported ? (!stdenv.isDarwin), libGLSupported ? !stdenv.isDarwin,
libGL, libGL,
buildExamples ? false, buildExamples ? false,
buildTests ? false, buildTests ? false,

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "blackshades-svn-110"; name = "blackshades-svn-110";
src = fetchsvn { src = fetchsvn {
url = svn://svn.icculus.org/blackshades/trunk; url = svn://svn.icculus.org/blackshades/trunk;
rev = 110; rev = "110";
sha256 = "0kbrh1dympk8scjxr6av24qs2bffz44l8qmw2m5gyqf4g3rxf6ra"; sha256 = "0kbrh1dympk8scjxr6av24qs2bffz44l8qmw2m5gyqf4g3rxf6ra";
}; };

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "blackshades-elite-svn-29"; name = "blackshades-elite-svn-29";
src = fetchsvn { src = fetchsvn {
url = svn://svn.gna.org/svn/blackshadeselite/trunk; url = svn://svn.gna.org/svn/blackshadeselite/trunk;
rev = 29; rev = "29";
sha256 = "1lkws5pqpgcgdlar11waikp6y41z678457n9jcik7nhn53cjjr1s"; sha256 = "1lkws5pqpgcgdlar11waikp6y41z678457n9jcik7nhn53cjjr1s";
}; };

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
src = fetchsvn { src = fetchsvn {
#url = "mirror://sourceforge/project/privateer/Wing%20Commander%20Privateer/Privateer%20Gemini%20Gold%201.03/PrivateerGold1.03.bz2.bin"; #url = "mirror://sourceforge/project/privateer/Wing%20Commander%20Privateer/Privateer%20Gemini%20Gold%201.03/PrivateerGold1.03.bz2.bin";
url = "https://privateer.svn.sourceforge.net/svnroot/privateer/privgold/trunk/engine"; url = "https://privateer.svn.sourceforge.net/svnroot/privateer/privgold/trunk/engine";
rev = 294; rev = "294";
sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63"; sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63";
}; };

View File

@ -3,7 +3,7 @@
, data ? fetchsvn { , data ? fetchsvn {
url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data"; url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data";
rev = 1386; rev = "1386";
sha256 = "0ka6zir9hg0md5p03dl461jkvbk05ywyw233hnc3ka6shz3vazi1"; sha256 = "0ka6zir9hg0md5p03dl461jkvbk05ywyw233hnc3ka6shz3vazi1";
} }
}: }:

View File

@ -1,7 +1,6 @@
{ stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }: { stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
let let
rev = "315";
color-profiles = stdenv.mkDerivation { color-profiles = stdenv.mkDerivation {
name = "splix-color-profiles-20070625"; name = "splix-color-profiles-20070625";
@ -19,14 +18,15 @@ let
''; '';
}; };
in stdenv.mkDerivation { in stdenv.mkDerivation rec {
name = "splix-svn-${rev}"; name = "splix-svn-${rev}";
rev = "315";
src = fetchsvn { src = fetchsvn {
# We build this from svn, because splix hasn't been in released in several years # We build this from svn, because splix hasn't been in released in several years
# although the community has been adding some new printer models. # although the community has been adding some new printer models.
url = "svn://svn.code.sf.net/p/splix/code/splix"; url = "svn://svn.code.sf.net/p/splix/code/splix";
rev = "r${rev}"; inherit rev;
sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl"; sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
}; };

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchsvn, linux { stdenv, lib, fetchsvn, linux
, scripts ? fetchsvn { , scripts ? fetchsvn {
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/"; url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/";
rev = "r15295"; rev = "15295";
sha256 = "03kqbjy7w9zg6ry86h9sxa33z0rblznhba109lwmjwy0wx7yk1cs"; sha256 = "03kqbjy7w9zg6ry86h9sxa33z0rblznhba109lwmjwy0wx7yk1cs";
} }
, ... , ...

View File

@ -76,7 +76,7 @@ let
mp3-202 = fetchsvn { mp3-202 = fetchsvn {
url = http://svn.digium.com/svn/thirdparty/mp3/trunk; url = http://svn.digium.com/svn/thirdparty/mp3/trunk;
rev = 202; rev = "202";
sha256 = "1s9idx2miwk178sa731ig9r4fzx4gy1q8xazfqyd7q4lfd70s1cy"; sha256 = "1s9idx2miwk178sa731ig9r4fzx4gy1q8xazfqyd7q4lfd70s1cy";
}; };

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchsvn { src = fetchsvn {
url = "https://svn.code.sf.net/p/netpbm/code/advanced"; url = "https://svn.code.sf.net/p/netpbm/code/advanced";
rev = 3264; rev = "3264";
sha256 = "17fmyjbxp1l18rma7gb0m8wd9kx2iwhqs8dd6fpalsn2cr8mf8hf"; sha256 = "17fmyjbxp1l18rma7gb0m8wd9kx2iwhqs8dd6fpalsn2cr8mf8hf";
}; };