Merge pull request #43857 from volth/unused

[bot] treewide: remove unreferenced code

Changed files
+16 -449
doc
lib
nixos
pkgs
applications
altcoins
audio
clementine
editors
emacs-modes
textadept
misc
bitcoinarmory
llpp
tqsl
networking
browsers
chromium
mozilla-plugins
flashplayer
office
mendeley
science
electronics
math
mathematica
misc
golly
virtualization
window-managers
build-support
development
compilers
haskell-modules
interpreters
python
ruby
libraries
wiredtiger
lisp-modules
mobile
ocaml-modules
pycaml
python-modules
gurobipy
ruby-modules
testing
tools
misc
dialog
phantomjs2
selenium
server
games
dwarf-fortress
wrapper
simutrans
misc
cups
drivers
canon
servers
x11
tools
X11
bumblebee
admin
ansible
filesystems
package-management
cargo-edit
top-level
-2
doc/default.nix
···
let
pkgs = import ./.. { };
lib = pkgs.lib;
-
sources = lib.sourceFilesBySuffices ./. [".xml"];
-
sources-langs = ./languages-frameworks;
in
pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
-2
lib/generators.nix
···
libStr = lib.strings;
libAttr = lib.attrsets;
-
flipMapAttrs = flip libAttr.mapAttrs;
-
inherit (lib) isFunction;
in
-1
lib/lists.nix
···
*/
foldl = op: nul: list:
let
-
len = length list;
foldl' = n:
if n == -1
then nul
-1
lib/modules.nix
···
{ config, options, ... }:
let
fromOpt = getAttrFromPath from options;
-
toOpt = getAttrFromPath to options;
toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist.");
in
-4
lib/tests/misc.nix
···
resRem7 = res6.replace (a: removeAttrs a ["a"]);
-
resReplace6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
-
x2 = x.merge { a = 20; }; # now we have 27
-
in (x2.replace) { a = 10; }; # and override the value by 10
-
# fixed tests (delayed args): (when using them add some comments, please)
resFixed1 =
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
-1
lib/types.nix
···
}
else
def;
-
listOnly = listOf elemType;
attrOnly = attrsOf elemType;
in mkOptionType rec {
name = "loaOf";
+1 -3
nixos/modules/config/fonts/fontconfig-ultimate.nix
···
with lib;
-
let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>";
-
-
cfg = config.fonts.fontconfig.ultimate;
+
let cfg = config.fonts.fontconfig.ultimate;
latestVersion = pkgs.fontconfig.configVersion;
-2
nixos/modules/installer/tools/tools.nix
···
with lib;
let
-
cfg = config.installer;
-
makeProg = args: pkgs.substituteAll (args // {
dir = "bin";
isExecutable = true;
-1
nixos/modules/profiles/clone-config.nix
···
let
relocateNixOS = path:
"<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">";
-
relocateOthers = null;
in
{ nixos = map relocateNixOS partitionedModuleFiles.nixos;
others = []; # TODO: copy the modules to the install-device repository.
-1
nixos/modules/programs/nylas-mail.nix
···
let
cfg = config.services.nylas-mail;
-
defaultUser = "nylas-mail";
in {
###### interface
options = {
-6
nixos/modules/programs/shell.nix
···
with lib;
-
let
-
-
cfg = config.environment;
-
-
in
-
{
config = {
-1
nixos/modules/programs/ssh.nix
···
let
cfg = config.programs.ssh;
-
cfgd = config.services.openssh;
askPassword = cfg.askPassword;
-2
nixos/modules/programs/xonsh.nix
···
let
-
cfge = config.environment;
-
cfg = config.programs.xonsh;
in
-1
nixos/modules/security/acme.nix
···
servicesLists = mapAttrsToList certToServices cfg.certs;
certToServices = cert: data:
let
-
domain = if data.domain != null then data.domain else cert;
cpath = lpath + optionalString (data.activationDelay != null) ".staging";
lpath = "${cfg.directory}/${cert}";
rights = if data.allowKeysForGroup then "750" else "700";
-11
nixos/modules/services/backup/bacula.nix
···
${dir_cfg.extraConfig}
'';
-
# TODO: by default use this config
-
bconsole_conf = pkgs.writeText "bconsole.conf"
-
''
-
Director {
-
Name = ${dir_cfg.name};
-
Address = "localhost";
-
DirPort = ${toString dir_cfg.port};
-
Password = "${dir_cfg.password}";
-
}
-
'';
-
directorOptions = {name, config, ...}:
{
options = {
-1
nixos/modules/services/backup/crashplan-small-business.nix
···
let
cfg = config.services.crashplansb;
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
-
varDir = "/var/lib/crashplan";
in
with lib;
-1
nixos/modules/services/backup/crashplan.nix
···
let
cfg = config.services.crashplan;
crashplan = pkgs.crashplan;
-
varDir = "/var/lib/crashplan";
in
with lib;
-1
nixos/modules/services/backup/restic.nix
···
mapAttrs' (name: backup:
let
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
-
connectTo = elemAt (splitString ":" backup.repository) 1;
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
in nameValuePair "restic-backups-${name}" ({
environment = {
-7
nixos/modules/services/backup/znapzend.nix
···
let
-
# Converts a plan like
-
# { "1d" = "1h"; "1w" = "1d"; }
-
# into
-
# "1d=>1h,1w=>1d"
-
attrToPlan = attrs: concatStringsSep "," (builtins.attrValues (
-
mapAttrs (n: v: "${n}=>${v}") attrs));
-
planDescription = ''
The znapzend backup plan to use for the source.
</para>
+1 -4
nixos/modules/services/cluster/hadoop/default.nix
···
{ config, lib, pkgs, ...}:
-
let
-
cfg = config.services.hadoop;
-
hadoopConf = import ./conf.nix { hadoop = cfg; pkgs = pkgs; };
-
in
+
with lib;
{
imports = [ ./yarn.nix ./hdfs.nix ];
-3
nixos/modules/services/cluster/kubernetes/default.nix
···
})}
'';
-
skipAttrs = attrs: map (filterAttrs (k: v: k != "enable"))
-
(filter (v: !(hasAttr "enable" v) || v.enable) attrs);
-
infraContainer = pkgs.dockerTools.buildImage {
name = "pause";
tag = "latest";
-2
nixos/modules/services/mail/dovecot.nix
···
baseDir = "/run/dovecot2";
stateDir = "/var/lib/dovecot";
-
canCreateMailUserGroup = cfg.mailUser != null && cfg.mailGroup != null;
-
dovecotConf = concatStrings [
''
base_dir = ${baseDir}
-10
nixos/modules/services/misc/disnix.nix
···
cfg = config.services.disnix;
-
dysnomia = pkgs.dysnomia.override (origArgs: {
-
enableApacheWebApplication = config.services.httpd.enable;
-
enableAxis2WebService = config.services.tomcat.axis2.enable;
-
enableEjabberdDump = config.services.ejabberd.enable;
-
enableMySQLDatabase = config.services.mysql.enable;
-
enablePostgreSQLDatabase = config.services.postgresql.enable;
-
enableSubversionRepository = config.services.svnserve.enable;
-
enableTomcatWebApplication = config.services.tomcat.enable;
-
enableMongoDatabase = config.services.mongodb.enable;
-
});
in
{
-37
nixos/modules/services/misc/docker-registry.nix
···
let
cfg = config.services.dockerRegistry;
-
blobCache = if cfg.enableRedisCache
-
then "redis"
-
else "inmemory";
-
-
registryConfig = {
-
version = "0.1";
-
log.fields.service = "registry";
-
storage = {
-
cache.blobdescriptor = blobCache;
-
filesystem.rootdirectory = cfg.storagePath;
-
delete.enabled = cfg.enableDelete;
-
};
-
http = {
-
addr = ":${builtins.toString cfg.port}";
-
headers.X-Content-Type-Options = ["nosniff"];
-
};
-
health.storagedriver = {
-
enabled = true;
-
interval = "10s";
-
threshold = 3;
-
};
-
};
-
-
registryConfig.redis = mkIf cfg.enableRedisCache {
-
addr = "${cfg.redisUrl}";
-
password = "${cfg.redisPassword}";
-
db = 0;
-
dialtimeout = "10ms";
-
readtimeout = "10ms";
-
writetimeout = "10ms";
-
pool = {
-
maxidle = 16;
-
maxactive = 64;
-
idletimeout = "300s";
-
};
-
};
-
configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
in {
-3
nixos/modules/services/misc/dysnomia.nix
···
cd $out
${concatMapStrings (containerName:
-
let
-
components = cfg.components."${containerName}";
-
in
linkMutableComponents { inherit containerName; }
) (builtins.attrNames cfg.components)}
'';
-1
nixos/modules/services/misc/emby.nix
···
let
cfg = config.services.emby;
-
emby = pkgs.emby;
in
{
options = {
-1
nixos/modules/services/misc/exhibitor.nix
···
let
cfg = config.services.exhibitor;
-
exhibitor = cfg.package;
exhibitorConfig = ''
zookeeper-install-directory=${cfg.baseDir}/zookeeper
zookeeper-data-directory=${cfg.zkDataDir}
-1
nixos/modules/services/misc/mediatomb.nix
···
let
-
uid = config.ids.uids.mediatomb;
gid = config.ids.gids.mediatomb;
cfg = config.services.mediatomb;
+1 -1
nixos/modules/services/misc/nzbget.nix
···
let
cfg = config.services.nzbget;
-
nzbget = pkgs.nzbget; in {
+
in {
options = {
services.nzbget = {
enable = mkEnableOption "NZBGet";
-1
nixos/modules/services/misc/plex.nix
···
let
cfg = config.services.plex;
-
plex = pkgs.plex;
in
{
options = {
-10
nixos/modules/services/misc/taskserver/default.nix
···
taskd = "${pkgs.taskserver}/bin/taskd";
-
mkVal = val:
-
if val == true then "true"
-
else if val == false then "false"
-
else if isList val then concatStringsSep ", " val
-
else toString val;
-
-
mkConfLine = key: val: let
-
result = "${key} = ${mkVal val}";
-
in optionalString (val != null && val != []) result;
-
mkManualPkiOption = desc: mkOption {
type = types.nullOr types.path;
default = null;
-3
nixos/modules/services/networking/gdomap.nix
···
with lib;
-
let
-
cfg = config.services.gdomap;
-
in
{
#
# interface
+2 -2
nixos/modules/services/networking/i2pd.nix
···
${flip concatMapStrings
(collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
-
(proto: let portStr = toString proto.port; in ''
+
(proto: ''
[${proto.name}]
enabled = ${boolToString proto.enable}
address = ${proto.address}
···
# DO NOT EDIT -- this file has been generated automatically.
${flip concatMapStrings
(collect (tun: tun ? port && tun ? destination) cfg.outTunnels)
-
(tun: let portStr = toString tun.port; in ''
+
(tun: ''
[${tun.name}]
type = client
destination = ${tun.destination}
-2
nixos/modules/services/networking/morty.nix
···
cfg = config.services.morty;
-
configFile = cfg.configFile;
-
in
{
-1
nixos/modules/services/networking/znc.nix
···
};
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
-
notNull = a: ! isNull a;
mkZncConf = confOpts: ''
Version = 1.6.3
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules}
-1
nixos/modules/services/system/saslauthd.nix
···
let
-
nssModulesPath = config.system.nssModules.path;
cfg = config.services.saslauthd;
in
-6
nixos/modules/services/torrent/transmission.nix
···
settingsDir = "${homeDir}/.config/transmission-daemon";
settingsFile = pkgs.writeText "settings.json" (builtins.toJSON fullSettings);
-
# Strings must be quoted, ints and bools must not (for settings.json).
-
toOption = x:
-
if isBool x then boolToString x
-
else if isInt x then toString x
-
else toString ''"${x}"'';
-
# for users in group "transmission" to have access to torrents
fullSettings = { umask = 2; download-dir = downloadDir; incomplete-dir = incompleteDir; } // cfg.settings;
-1
nixos/modules/services/web-apps/frab.nix
···
cfg = config.services.frab;
package = pkgs.frab;
-
ruby = package.ruby;
databaseConfig = builtins.toJSON { production = cfg.database; };
-5
nixos/modules/services/web-servers/apache-httpd/default.nix
···
allSubservices = mainSubservices ++ concatMap subservicesFor mainCfg.virtualHosts;
-
# !!! should be in lib
-
writeTextInDir = name: text:
-
pkgs.runCommand name {inherit text;} "mkdir -p $out; echo -n \"$text\" > $out/$name";
-
-
enableSSL = any (vhost: vhost.enableSSL) allHosts;
-11
nixos/modules/services/web-servers/apache-httpd/owncloud.nix
···
let
-
httpd = serverInfo.serverConfig.package;
-
-
version24 = !versionOlder httpd.version "2.4";
-
-
allGranted = if version24 then ''
-
Require all granted
-
'' else ''
-
Order allow,deny
-
Allow from all
-
'';
-
owncloudConfig = pkgs.writeText "config.php"
''
<?php
-2
nixos/modules/services/web-servers/apache-httpd/trac.nix
···
apacheHttpd = httpd;
};
-
pythonLib = p: "${p}/";
-
httpd = serverInfo.serverConfig.package;
versionPre24 = versionOlder httpd.version "2.4";
-4
nixos/modules/services/web-servers/uwsgi.nix
···
else if hasPython3 then uwsgi.python3
else null;
-
pythonPackages = pkgs.pythonPackages.override {
-
inherit python;
-
};
-
pythonEnv = python.withPackages (c.pythonPackages or (self: []));
uwsgiCfg = {
-1
nixos/modules/services/x11/desktop-managers/gnome3.nix
···
let
pkgName = drv: (builtins.parseDrvName drv.name).name;
ysNames = map pkgName ys;
-
res = (filter (x: !(builtins.elem (pkgName x) ysNames)) xs);
in
filter (x: !(builtins.elem (pkgName x) ysNames)) xs;
-1
nixos/modules/system/boot/stage-1.nix
···
udev = config.systemd.package;
-
kernelPackages = config.boot.kernelPackages;
modulesTree = config.system.modulesTree;
firmware = config.hardware.firmware;
-3
nixos/modules/system/boot/stage-2.nix
···
let
-
kernel = config.boot.kernelPackages.kernel;
-
activateConfiguration = config.system.activationScripts.script;
-
bootStage2 = pkgs.substituteAll {
src = ./stage-2-init.sh;
shellDebug = "${pkgs.bashInteractive}/bin/bash";
-3
nixos/modules/system/boot/systemd-nspawn.nix
···
let
cfg = config.systemd.nspawn;
-
assertions = [
-
# boot = true -> processtwo != true
-
];
checkExec = checkUnitConfig "Exec" [
(assertOnlyFields [
-2
nixos/modules/system/boot/systemd.nix
···
"timers.target"
];
-
boolToString = value: if value then "yes" else "no";
-
makeJobScript = name: text:
let mkScriptName = s: (replaceChars [ "\\" ] [ "-" ] (shellEscape s) );
x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${mkScriptName name}"; inherit text; };
-1
nixos/modules/tasks/encrypted-devices.nix
···
encDevs = filter (dev: dev.encrypted.enable) fileSystems;
keyedEncDevs = filter (dev: dev.encrypted.keyFile != null) encDevs;
keylessEncDevs = filter (dev: dev.encrypted.keyFile == null) encDevs;
-
isIn = needle: haystack: filter (p: p == needle) haystack != [];
anyEncrypted =
fold (j: v: v || j.encrypted.enable) false encDevs;
-1
nixos/modules/tasks/filesystems/zfs.nix
···
let
-
cfgSpl = config.boot.spl;
cfgZfs = config.boot.zfs;
cfgSnapshots = config.services.zfs.autoSnapshot;
cfgSnapFlags = cfgSnapshots.flags;
-1
nixos/modules/tasks/network-interfaces-scripted.nix
···
cfg = config.networking;
interfaces = attrValues cfg.interfaces;
-
hasVirtuals = any (i: i.virtual) interfaces;
slaves = concatMap (i: i.interfaces) (attrValues cfg.bonds)
++ concatMap (i: i.interfaces) (attrValues cfg.bridges)
-4
nixos/modules/testing/test-instrumentation.nix
···
with lib;
with import ../../lib/qemu-flags.nix { inherit pkgs; };
-
let
-
kernel = config.boot.kernelPackages.kernel;
-
in
-
{
# This option is a dummy that if used in conjunction with
-3
nixos/modules/virtualisation/openvswitch.nix
···
# Where the communication sockets live
runDir = "/var/run/openvswitch";
-
# Where the config database live (can't be in nix-store)
-
stateDir = "/var/db/openvswitch";
-
# The path to the an initialized version of the database
db = pkgs.stdenv.mkDerivation {
name = "vswitch.db";
+2 -8
nixos/tests/cjdns.nix
···
carolKey = "2d2a338b46f8e4a8c462f0c385b481292a05f678e19a2b82755258cf0f0af7e2";
carolPubKey = "n932l3pjvmhtxxcdrqq2qpw5zc58f01vvjx01h4dtd1bb0nnu2h0.k";
carolPassword = "678287829ce4c67bc8b227e56d94422ee1b85fa11618157b2f591de6c6322b52";
-
carolIp4 = "192.168.0.9";
basicConfig =
{ config, pkgs, ... }:
···
bob =
{ config, lib, nodes, ... }:
-
let carolIp4 = lib.mkForce nodes.carol.config.networking.interfaces.eth1; in
-
-
{ imports = [ basicConfig ];
+
{ imports = [ basicConfig ];
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.2"; prefixLength = 24; }
···
# but knows neither Alice or Bob.
carol =
{ config, lib, nodes, ... }:
-
let
-
carolIp4 = (lib.mkForce nodes.carol.config.networking.interfaces.eth1);
-
in
-
{ imports = [ basicConfig ];
+
{ imports = [ basicConfig ];
environment.etc."cjdns.keys".text = ''
CJDNS_PRIVATE_KEY=${carolKey}
-1
nixos/tests/containers-reloadable.nix
···
};
testScript = {nodes, ...}: let
-
originalSystem = nodes.client.config.system.build.toplevel;
c1System = nodes.client_c1.config.system.build.toplevel;
c2System = nodes.client_c2.config.system.build.toplevel;
in ''
-3
nixos/tests/installer.nix
···
'';
-
channelContents = [ pkgs.rlwrap ];
-
-
# The test script boots a NixOS VM, installs NixOS on an empty hard
# disk, and then reboot from the hard disk. It's parameterized with
# a test script fragment `createPartitions', which must create
-2
nixos/tests/pam-oath-login.nix
···
# and picking a the first 4:
oathSnakeOilPassword1 = "143349";
oathSnakeOilPassword2 = "801753";
-
oathSnakeOilPassword3 = "019933";
-
oathSnakeOilPassword4 = "403895";
alicePassword = "foobar";
# Generated via: mkpasswd -m sha-512 and passing in "foobar"
+2 -2
pkgs/applications/altcoins/mist.nix
···
};
mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation {
-
inherit name version;
+
inherit name version meta;
src = {
i686-linux = fetchurl {
···
});
in
buildFHSUserEnv {
-
inherit name;
+
inherit name meta;
targetPkgs = pkgs: with pkgs; [
mist
-3
pkgs/applications/audio/clementine/default.nix
···
, qca2, pkgconfig, sparsehash, config, makeWrapper, runCommand, gst_plugins }:
let
-
withSpotify = config.clementine.spotify or false;
withIpod = config.clementine.ipod or false;
withMTP = config.clementine.mtp or true;
withCD = config.clementine.cd or true;
withCloud = config.clementine.cloud or true;
version = "1.3.1";
-
-
exeName = "clementine";
src = fetchurl {
url = https://github.com/clementine-player/Clementine/archive/1.3.1.tar.gz;
-6
pkgs/applications/editors/emacs-modes/org-packages.nix
···
super = imported;
-
markBroken = pkg: pkg.override {
-
elpaBuild = args: self.elpaBuild (args // {
-
meta = (args.meta or {}) // { broken = true; };
-
});
-
};
-
overrides = {
};
-1
pkgs/applications/editors/textadept/default.nix
···
gtdialog_zip = "gtdialog_1.3.zip";
cdk_tgz = "cdk-5.0-20150928.tgz";
termkey_tgz = "libtermkey-0.17.tar.gz";
-
bombay_zip = "bombay.zip";
scinterm_url = "http://foicica.com/scinterm/download/" + scinterm_zip;
tre_url = "https://github.com/laurikari/tre/archive/" + tre_zip;
-1
pkgs/applications/misc/bitcoinarmory/default.nix
···
let
version = "0.96.1";
-
sitePackages = pythonPackages.python.sitePackages;
inherit (pythonPackages) buildPythonApplication pyqt4 psutil twisted;
in buildPythonApplication {
+1 -2
pkgs/applications/misc/llpp/default.nix
···
assert lib.versionAtLeast (lib.getVersion ocaml) "4.02";
-
let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
-
in stdenv.mkDerivation rec {
+
stdenv.mkDerivation rec {
name = "llpp-${version}";
version = "2018-03-02";
-7
pkgs/applications/misc/tqsl/default.nix
···
{ stdenv, fetchurl, makeWrapper, cmake, expat, openssl, zlib, db, curl, wxGTK }:
-
let
-
lib_suffix =
-
if stdenv.system == "x86_64-linux" then
-
"64"
-
else
-
"";
-
in
stdenv.mkDerivation rec {
name = "tqsl-${version}";
version = "2.3.1";
-4
pkgs/applications/networking/browsers/chromium/common.nix
···
# source tree.
extraAttrs = buildFun base;
-
gentooPatch = name: sha256: fetchpatch {
-
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/${name}";
-
inherit sha256;
-
};
githubPatch = commit: sha256: fetchpatch {
url = "https://github.com/chromium/chromium/commit/${commit}.patch";
inherit sha256;
-6
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix
···
, debug ? false
}:
-
let
-
arch =
-
if stdenv.system == "x86_64-linux" then
-
"x86_64"
-
else throw "Flash Player is not supported on this platform";
-
in
stdenv.mkDerivation rec {
name = "flashplayer-standalone-${version}";
version = "30.0.0.134";
-1
pkgs/applications/office/mendeley/default.nix
···
let
arch32 = "i686-linux";
-
arch64 = "x86_64-linux";
arch = if stdenv.system == arch32
then "i386"
-4
pkgs/applications/science/electronics/bitscope/common.nix
···
${(wrapBinary libs) attrs.toolName}
'';
});
-
fhs = target: buildFHSUserEnv {
-
inherit (pkg) name;
-
runScript = target;
-
};
in buildFHSUserEnv {
name = "${attrs.toolName}-${attrs.version}";
runScript = "${pkg.outPath}/bin/${attrs.toolName}";
-4
pkgs/applications/science/electronics/bitscope/packages.nix
···
}:
let
-
wrapBinary = libPaths: binaryName: ''
-
wrapProgram "$out/bin/${binaryName}" \
-
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
-
'';
mkBitscope = callPackage (import ./common.nix) { };
in {
chart = let
-6
pkgs/applications/science/math/mathematica/default.nix
···
}:
let
-
platform =
-
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then
-
"Linux"
-
else
-
throw "Mathematica requires i686-linux or x86_64 linux";
-
l10n =
with stdenv.lib;
with callPackage ./l10ns.nix {};
+1 -9
pkgs/applications/science/misc/golly/beta.nix
···
, wxGTK, perl, python2, zlib, libGLU_combined, libX11
, automake, autoconf
}:
-
let
-
s = # Generated upstream information
-
rec {
-
baseName="golly";
-
version="2.8";
-
name="${baseName}-${version}";
-
hash="0a4vn2hm7h4b47v2iwip1z3n9y8isf79v08aipl2iqms2m3p5204";
-
};
-
in
+
stdenv.mkDerivation rec {
name = "golly-${version}";
version = "2.8.99.2.20161122";
-5
pkgs/applications/virtualization/xen/4.10.nix
···
# and try applying all the ones we don't have yet.
let
-
xsaPatch = { name , sha256 }: (fetchpatch {
-
url = "https://xenbits.xen.org/xsa/xsa${name}.patch";
-
inherit sha256;
-
});
-
xsa = import ./xsa-patches.nix { inherit fetchpatch; };
qemuMemfdBuildFix = fetchpatch {
-5
pkgs/applications/virtualization/xen/4.8.nix
···
# and try applying all the ones we don't have yet.
let
-
xsaPatch = { name , sha256 }: (fetchpatch {
-
url = "https://xenbits.xen.org/xsa/xsa${name}.patch";
-
inherit sha256;
-
});
-
xsa = import ./xsa-patches.nix { inherit fetchpatch; };
xenlockprofpatch = (fetchpatch {
-7
pkgs/applications/window-managers/way-cooler/way-cooler.nix
···
# Generated by carnix 0.6.5: carnix -o way-cooler.nix Cargo.lock
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-7
pkgs/applications/window-managers/way-cooler/wc-bg.nix
···
# Generated by carnix 0.6.5: carnix -o wc-bg.nix Cargo.lock
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-7
pkgs/applications/window-managers/way-cooler/wc-grab.nix
···
# Generated by carnix 0.6.5: carnix -o wc-grab.nix Cargo.lock
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-7
pkgs/applications/window-managers/way-cooler/wc-lock.nix
···
# Generated by carnix 0.6.5: carnix -o wc-lock.nix Cargo.lock
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-3
pkgs/build-support/dotnetenv/build-solution.nix
···
assert modifyPublicMain -> mainClassFile != null;
-
let
-
wrapperCS = ./Wrapper.cs.in;
-
in
stdenv.mkDerivation {
inherit name src;
-2
pkgs/build-support/fetchdocker/generic-fetcher.nix
···
let
awk = "${gawk}/bin/awk";
dockerCredentialsFile = import ./credentials.nix;
-
stripScheme =
-
builtins.replaceStrings [ "https://" "http://" ] [ "" "" ];
in
{ fetcher
, name
+1 -10
pkgs/build-support/rust/build-rust-crate.nix
···
crateType, metadata, crateBin, finalBins,
extraRustcOpts, verbose, colors }:
-
let depsDir = lib.concatStringsSep " " dependencies;
-
completeDepsDir = lib.concatStringsSep " " completeDeps;
-
completeBuildDepsDir = lib.concatStringsSep " " completeBuildDeps;
-
deps = makeDeps dependencies;
-
optLevel = if release then 3 else 0;
+
let deps = makeDeps dependencies;
rustcOpts =
lib.lists.foldl' (opts: opt: opts + " " + opt)
(if release then "-C opt-level=3" else "-C debuginfo=2")
(["-C codegen-units=1"] ++ extraRustcOpts);
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
-
version_ = lib.splitString "-" crateVersion;
-
versionPre = if lib.tail version_ == [] then "" else builtins.elemAt version_ 1;
-
version = lib.splitString "." (lib.head version_);
-
authors = lib.concatStringsSep ":" crateAuthors;
in ''
runHook preBuild
norm=""
···
preConfigure, postConfigure, preBuild, postBuild, preInstall, postInstall }:
let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverrides crate_);
-
release_ = release;
dependencies_ = dependencies;
buildDependencies_ = buildDependencies;
processedAttrs = [
-6
pkgs/build-support/rust/carnix.nix
···
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-2
pkgs/build-support/rust/default.nix
···
assert cargoVendorDir == null -> cargoSha256 != "unset";
let
-
lib = stdenv.lib;
-
cargoDeps = if cargoVendorDir == null
then fetchcargo {
inherit name src srcs sourceRoot cargoUpdateHook;
-5
pkgs/build-support/vm/windows/default.nix
···
in {
runInWindowsVM = drv: let
-
newDrv = drv.override {
-
stdenv = drv.stdenv.override {
-
shell = "/bin/sh";
-
};
-
};
in pkgs.lib.overrideDerivation drv (attrs: let
bootstrap = bootstrapper attrs.windowsImage;
in {
-1
pkgs/development/compilers/chicken/eggDerivation.nix
···
let
libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
overrides = import ./overrides.nix;
-
lib = stdenv.lib;
baseName = (builtins.parseDrvName name).name;
override = if builtins.hasAttr baseName overrides
then
-3
pkgs/development/compilers/gcc/4.8/default.nix
···
let version = "4.8.5";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches = [ ]
-3
pkgs/development/compilers/gcc/4.9/default.nix
···
let version = "4.9.4";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-3
pkgs/development/compilers/gcc/5/default.nix
···
let version = "5.5.0";
sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-3
pkgs/development/compilers/gcc/6/default.nix
···
let version = "6.4.0";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-3
pkgs/development/compilers/gcc/7/default.nix
···
let version = "7.3.0";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-3
pkgs/development/compilers/gcc/8/default.nix
···
let version = "8.1.0";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-3
pkgs/development/compilers/gcc/snapshot/default.nix
···
let version = "7-20170409";
-
# Whether building a cross-compiler for GNU/Hurd.
-
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
-
enableParallelBuilding = true;
patches =
-1
pkgs/development/compilers/ocaml/ber-metaocaml-104.nix
···
let
useX11 = stdenv.isi686 || stdenv.isx86_64;
-
useNativeCompilers = stdenv.isi686 || stdenv.isx86_64 || stdenv.isMips;
inherit (stdenv.lib) optionals optionalString;
in
-4
pkgs/development/haskell-modules/hoogle.nix
···
if !isGhcjs
then "haddock"
else "haddock-ghcjs";
-
ghcName =
-
if !isGhcjs
-
then "ghc"
-
else "ghcjs";
ghcDocLibDir =
if !isGhcjs
then ghc.doc + ''/share/doc/ghc*/html/libraries''
-5
pkgs/development/interpreters/python/cpython/2.7/default.nix
···
majorVersion = "2.7";
minorVersion = "15";
minorVersionSuffix = "";
-
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
···
# Never even try to use lchmod on linux,
# don't rely on detecting glibc-isms.
++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no";
-
-
postConfigure = if hostPlatform.isCygwin then ''
-
sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),'
-
'' else null;
buildInputs =
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
-1
pkgs/development/interpreters/python/cpython/3.4/default.nix
···
majorVersion = "3.4";
minorVersion = "8";
minorVersionSuffix = "";
-
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
-1
pkgs/development/interpreters/python/cpython/3.5/default.nix
···
majorVersion = "3.5";
minorVersion = "5";
minorVersionSuffix = "";
-
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
-1
pkgs/development/interpreters/python/cpython/3.6/default.nix
···
majorVersion = "3.6";
minorVersion = "6";
minorVersionSuffix = "";
-
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
-1
pkgs/development/interpreters/python/cpython/3.7/default.nix
···
majorVersion = "3.7";
minorVersion = "0";
minorVersionSuffix = "";
-
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
-2
pkgs/development/interpreters/ruby/default.nix
···
generic = { version, sha256 }: let
ver = version;
tag = ver.gitTag;
-
isRuby20 = ver.majMin == "2.0";
-
isRuby21 = ver.majMin == "2.1";
isRuby25 = ver.majMin == "2.5";
baseruby = self.override { useRailsExpress = false; };
self = lib.makeOverridable (
-1
pkgs/development/libraries/wiredtiger/default.nix
···
+ optionalString (val != null && cond != false) "=${val}";
mkEnable = mkFlag "enable-" "disable-";
mkWith = mkFlag "with-" "without-";
-
mkOther = mkFlag "" "" true;
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
-1
pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
···
{pkgs, buildLispPackage, clwrapper, quicklisp-to-nix-packages}:
let
-
addDeps = newdeps: x: {deps = x.deps ++ newdeps;};
addNativeLibs = libs: x: { propagatedBuildInputs = libs; };
skipBuildPhase = x: {
overrides = y: ((x.overrides y) // { buildPhase = "true"; });
-3
pkgs/development/mobile/androidenv/androidndk.nix
···
sed_script_1 =
"'s|^PROGDIR=`dirname $0`" +
"|PROGDIR=`dirname $(readlink -f $(which $0))`|'";
-
sed_script_2 =
-
"'s|^MYNDKDIR=`dirname $0`" +
-
"|MYNDKDIR=`dirname $(readlink -f $(which $0))`|'";
runtime_paths = (lib.makeBinPath [
coreutils file findutils
gawk gnugrep gnused
-4
pkgs/development/mobile/androidenv/build-app.nix
···
assert release -> keyStore != null && keyAlias != null && keyStorePassword != null && keyAliasPassword != null;
let
-
platformName = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then "linux"
-
else if stdenv.system == "x86_64-darwin" then "macosx"
-
else throw "Platform: ${stdenv.system} is not supported!";
-
androidsdkComposition = androidsdk {
inherit platformVersions useGoogleAPIs;
abiVersions = [];
+1 -6
pkgs/development/ocaml-modules/pycaml/default.nix
···
# This is the original pycaml version with patches from debian.
-
let debian = fetchurl {
-
url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz";
-
sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1";
-
};
-
-
in stdenv.mkDerivation {
+
stdenv.mkDerivation {
name = "pycaml-0.82-14";
srcs = [
+2 -5
pkgs/development/python-modules/gurobipy/linux.nix
···
{ fetchurl, python }:
assert python.pkgs.isPy27;
-
let utf =
-
if python.ucsEncoding == 2 then "16"
-
else if python.ucsEncoding == 4 then "32"
-
else throw "Unsupported python UCS encoding UCS${toString python.ucsEncoding}";
-
in python.pkgs.buildPythonPackage
+
+
python.pkgs.buildPythonPackage
{ pname = "gurobipy";
version = "7.5.2";
src = fetchurl
-3
pkgs/development/ruby-modules/testing/stubs.nix
···
{ stdenv, lib, ruby, callPackage, ... }:
let
-
real = {
-
inherit (stdenv) mkDerivation;
-
};
mkDerivation = {name, ...}@argSet:
derivation {
inherit name;
+1 -2
pkgs/development/tools/misc/dialog/default.nix
···
, unicodeSupport ? true
}:
-
let optional = stdenv.lib.optional;
-
optStr = stdenv.lib.optionalString;
+
let optStr = stdenv.lib.optionalString;
buildShared = !stdenv.isDarwin;
in
-18
pkgs/development/tools/phantomjs2/default.nix
···
}:
let
-
fakeXcrun = writeScriptBin "xcrun" ''
-
#!${stdenv.shell}
-
echo >&2 "Fake xcrun: ''$@"
-
args=()
-
while (("$#")); do
-
case "$1" in
-
-sdk*) shift;;
-
-find*) shift;;
-
*) args+=("$1");;
-
esac
-
shift
-
done
-
-
if [ "''${#args[@]}" -gt "0" ]; then
-
echo >&2 "Fake xcrun: ''${args[@]}"
-
exec "''${args[@]}"
-
fi
-
'';
fakeClang = writeScriptBin "clang" ''
#!${stdenv.shell}
if [[ "$@" == *.c ]]; then
-3
pkgs/development/tools/selenium/server/default.nix
···
let
minorVersion = "3.6";
patchVersion = "0";
-
arch = if stdenv.system == "x86_64-linux" then "amd64"
-
else if stdenv.system == "i686-linux" then "i386"
-
else "";
in stdenv.mkDerivation rec {
name = "selenium-server-standalone-${version}";
-2
pkgs/games/dwarf-fortress/wrapper/default.nix
···
then builtins.getAttr theme themes
else theme;
-
twbtOnlyWithDFHack = assert (enableDFHack || !enableTWBT); true;
-
unBool = b: if b then "YES" else "NO";
# These are in inverse order for first packages to override the next ones.
-1
pkgs/games/simutrans/default.nix
···
ver3 = "2";
version = "${ver1}.${ver2}.${ver3}";
ver_dash = "${ver1}-${ver2}-${ver3}";
-
ver2_dash = "${ver1}-${ver2}";
binary_src = fetchurl {
url = "mirror://sourceforge/simutrans/simutrans/${ver_dash}/simutrans-src-${ver_dash}.zip";
-1
pkgs/misc/cups/drivers/canon/default.nix
···
i686_NIX_GCC = pkgsi686Linux.callPackage ({gcc}: gcc) {};
i686_libxml2 = pkgsi686Linux.callPackage ({libxml2}: libxml2) {};
-
i686_glibc = pkgsi686Linux.callPackage ({glibc}: glibc) {};
src_canon = fetchurl {
url = "https://files.canon-europe.com/files/soft45378/software/o147jen_linuxufrII_0290.zip";
-12
pkgs/servers/x11/xorg/overrides.nix
···
malloc0ReturnsNullCrossFlag = stdenv.lib.optional
(stdenv.hostPlatform != stdenv.buildPlatform)
"--enable-malloc0returnsnull";
-
-
gitRelease = { libName, version, rev, sha256 } : attrs : attrs // {
-
name = libName + "-" + version;
-
src = args.fetchgit {
-
url = git://anongit.freedesktop.org/xorg/lib/ + libName;
-
inherit rev sha256;
-
};
-
buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ];
-
preConfigure = (attrs.preConfigure or "") + "\n./autogen.sh";
-
};
-
-
compose = f: g: x: f (g x);
in
{
bdftopcf = attrs: attrs // {
-5
pkgs/tools/X11/bumblebee/default.nix
···
let
version = "3.2.1";
-
primus = if useNvidia then primusLib else primusLib.override { nvidia_x11 = null; };
-
primus_i686 = if useNvidia then primusLib_i686 else primusLib_i686.override { nvidia_x11 = null; };
-
-
primusLibs = lib.makeLibraryPath ([ primus ] ++ lib.optional (primusLib_i686 != null) primus_i686);
-
nvidia_x11s = [ nvidia_x11 ]
++ lib.optional nvidia_x11.useGLVND libglvnd
++ lib.optionals (nvidia_x11_i686 != null)
-13
pkgs/tools/admin/ansible/default.nix
···
}:
let
-
oldJinja = python2.override {
-
packageOverrides = self: super: {
-
jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec {
-
version = "2.8.1";
-
src = oldAttrs.src.override {
-
inherit version;
-
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
-
};
-
doCheck = false;
-
});
-
};
-
};
-
generic = { version, sha256, py ? python2 }: py.pkgs.buildPythonPackage rec {
pname = "ansible";
inherit version;
-5
pkgs/tools/filesystems/ceph/generic.nix
···
optExpat = shouldUsePkg expat;
optCurl = shouldUsePkg curl;
optFuse = shouldUsePkg fuse;
-
optLibibverbs = shouldUsePkg libibverbs;
-
optLibrdmacm = shouldUsePkg librdmacm;
optLibedit = shouldUsePkg libedit;
optLibatomic_ops = shouldUsePkg libatomic_ops;
optKinetic-cpp-client = shouldUsePkg kinetic-cpp-client;
···
optLibxfs = shouldUsePkg libxfs;
optZfs = shouldUsePkg zfs;
-
hasMon = true;
-
hasMds = true;
-
hasOsd = true;
hasRadosgw = optFcgi != null && optExpat != null && optCurl != null && optLibedit != null;
-7
pkgs/tools/package-management/cargo-edit/cargo-edit.nix
···
with pkgs;
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
-
include = includedFiles: src: builtins.filterSource (path: type:
-
lib.lists.any (f:
-
let p = toString (src + ("/" + f)); in
-
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
-
) includedFiles
-
) src;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
-1
pkgs/top-level/haxe-packages.nix
···
let
self = haxePackages;
-
callPackage = newScope self;
haxePackages = with self; {
withCommas = stdenv.lib.replaceChars ["."] [","];
-1
pkgs/top-level/lua-packages.nix
···
}:
let
-
isLua51 = lua.luaversion == "5.1";
isLua52 = lua.luaversion == "5.2";
isLuaJIT = (builtins.parseDrvName lua.name).name == "luajit";