Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivial: tiny cleanups and fixes #49864

Merged
merged 8 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ rec {
# Get the commit id of a git repo
# Example: commitIdFromGitRepo <nixpkgs/.git>
commitIdFromGitRepo =
let readCommitFromFile = path: file:
let readCommitFromFile = file: path:
with builtins;
let fileName = toString path + "/" + file;
packedRefsName = toString path + "/packed-refs";
Expand All @@ -85,7 +85,7 @@ rec {
matchRef = match "^ref: (.*)$" fileContent;
in if isNull matchRef
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
# packed-refs file, so we have to grep through it:
else if lib.pathExists packedRefsName
Expand All @@ -96,7 +96,7 @@ rec {
then throw ("Could not find " + file + " in " + packedRefsName)
else lib.head matchRef
else throw ("Not a .git directory: " + path);
in lib.flip readCommitFromFile "HEAD";
in readCommitFromFile "HEAD";

pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir);

Expand Down
13 changes: 8 additions & 5 deletions nixos/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ let
system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev;
};

makeModules = module: rest: [ configuration versionModule module rest ];

makeIso =
{ module, type, system, ... }:
Expand All @@ -53,7 +54,9 @@ let

hydraJob ((import lib/eval-config.nix {
inherit system;
modules = [ configuration module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ];
modules = makeModules module {
isoImage.isoBaseName = "nixos-${type}";
};
}).config.system.build.isoImage);


Expand All @@ -64,7 +67,7 @@ let

hydraJob ((import lib/eval-config.nix {
inherit system;
modules = [ configuration module versionModule ];
modules = makeModules module {};
}).config.system.build.sdImage);


Expand All @@ -77,7 +80,7 @@ let

config = (import lib/eval-config.nix {
inherit system;
modules = [ configuration module versionModule ];
modules = makeModules module {};
}).config;

tarball = config.system.build.tarball;
Expand All @@ -97,7 +100,7 @@ let

buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix {
inherit system;
modules = [ configuration module versionModule ] ++ singleton
modules = makeModules module
({ ... }:
{ fileSystems."/".device = mkDefault "/dev/sda1";
boot.loader.grub.device = mkDefault "/dev/sda";
Expand All @@ -108,7 +111,7 @@ let
let
configEvaled = import lib/eval-config.nix {
inherit system;
modules = [ module versionModule ];
modules = makeModules module {};
};
build = configEvaled.config.system.build;
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/espeak-ng/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {

meta = with stdenv.lib; {
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;
maintainers = with maintainers; [ aske ];
platforms = platforms.linux;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/gnuradio/rds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "bastibl";
repo = "gr-rds";
rev = "$v{version}";
rev = "v${version}";
sha256 = "008284ya464q4h4fd0zvcn6g7bym231p8fl3kdxncz9ks4zsbsxs";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/browsers/firefox/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## optional libraries

, alsaSupport ? stdenv.isLinux, alsaLib
, pulseaudioSupport ? true, libpulseaudio
, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message should be descriptive like "firefox: disable pulseaudio support on non-Linux by default"

, ffmpegSupport ? true, gstreamer, gst-plugins-base
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
, gssSupport ? true, kerberos
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/libraries/mesa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@

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"
else

let
defaultGalliumDrivers =
optionals (builtins.elem "drm" eglPlatforms)
optionals (elem "drm" eglPlatforms)
(if stdenv.isAarch32
then ["virgl" "nouveau" "freedreno" "vc4" "etnaviv" "imx"]
else if stdenv.isAarch64
then ["virgl" "nouveau" "vc4" ]
else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"]);
defaultDriDrivers =
optionals (builtins.elem "drm" eglPlatforms)
optionals (elem "drm" eglPlatforms)
(if (stdenv.isAarch32 || stdenv.isAarch64)
then ["nouveau"]
else ["i915" "i965" "nouveau" "radeon" "r200"]);
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/5.11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let

qtCompatVersion = "5.11";

mirror = "http://download.qt.io";
mirror = "https://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
# Community port of the now unmaintained upstream qtwebkit.
qtwebkit = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/modules/qtbase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
withGtk3 ? false, dconf ? null, gtk3 ? null,

# options
libGLSupported ? (!stdenv.isDarwin),
libGLSupported ? !stdenv.isDarwin,
libGL,
buildExamples ? false,
buildTests ? false,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/games/blackshades/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "blackshades-svn-110";
src = fetchsvn {
url = svn://svn.icculus.org/blackshades/trunk;
rev = 110;
rev = "110";
sha256 = "0kbrh1dympk8scjxr6av24qs2bffz44l8qmw2m5gyqf4g3rxf6ra";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/games/blackshadeselite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "blackshades-elite-svn-29";
src = fetchsvn {
url = svn://svn.gna.org/svn/blackshadeselite/trunk;
rev = 29;
rev = "29";
sha256 = "1lkws5pqpgcgdlar11waikp6y41z678457n9jcik7nhn53cjjr1s";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/games/privateer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stdenv.mkDerivation {
src = fetchsvn {
#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";
rev = 294;
rev = "294";
sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/games/vdrift/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

, data ? fetchsvn {
url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data";
rev = 1386;
rev = "1386";
sha256 = "0ka6zir9hg0md5p03dl461jkvbk05ywyw233hnc3ka6shz3vazi1";
}
}:
Expand Down
6 changes: 3 additions & 3 deletions pkgs/misc/cups/drivers/splix/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:

let
rev = "315";

color-profiles = stdenv.mkDerivation {
name = "splix-color-profiles-20070625";
Expand All @@ -19,14 +18,15 @@ let
'';
};

in stdenv.mkDerivation {
in stdenv.mkDerivation rec {
name = "splix-svn-${rev}";
rev = "315";

src = fetchsvn {
# 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.
url = "svn://svn.code.sf.net/p/splix/code/splix";
rev = "r${rev}";
inherit rev;
sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/kernel/linux-libre.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchsvn, linux
, scripts ? fetchsvn {
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/";
rev = "r15295";
rev = "15295";
sha256 = "03kqbjy7w9zg6ry86h9sxa33z0rblznhba109lwmjwy0wx7yk1cs";
}
, ...
Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/asterisk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ let

mp3-202 = fetchsvn {
url = http://svn.digium.com/svn/thirdparty/mp3/trunk;
rev = 202;
rev = "202";
sha256 = "1s9idx2miwk178sa731ig9r4fzx4gy1q8xazfqyd7q4lfd70s1cy";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/graphics/netpbm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stdenv.mkDerivation rec {

src = fetchsvn {
url = "https://svn.code.sf.net/p/netpbm/code/advanced";
rev = 3264;
rev = "3264";
sha256 = "17fmyjbxp1l18rma7gb0m8wd9kx2iwhqs8dd6fpalsn2cr8mf8hf";
};

Expand Down