mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge branch 'master' into staging-next
This commit is contained in:
commit
f19b7b03a0
@ -112,6 +112,18 @@
|
||||
<option>-I</option>
|
||||
<replaceable>path</replaceable>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>-L</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>--refresh</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>--no-net</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>--impure</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--verbose</option></arg>
|
||||
@ -130,6 +142,18 @@
|
||||
</group>
|
||||
<replaceable>number</replaceable>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>--fallback</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>--repair</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--no-build-output</option></arg>
|
||||
<arg choice='plain'><option>-Q</option></arg>
|
||||
</group>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--keep-failed</option></arg>
|
||||
@ -567,10 +591,19 @@
|
||||
|
||||
<para>
|
||||
In addition, <command>nixos-rebuild</command> accepts various Nix-related
|
||||
flags, including <option>--max-jobs</option> / <option>-j</option>,
|
||||
flags: <option>-I</option>, <option>--max-jobs</option> / <option>-j</option>,
|
||||
<option>--show-trace</option>, <option>--keep-failed</option>,
|
||||
<option>--keep-going</option>, <option>--impure</option>, and <option>--verbose</option> /
|
||||
<option>--keep-going</option>, <option>--impure</option>, and <option>--verbose</option> /
|
||||
<option>--builders</option>, <option>--show-trace</option>,
|
||||
<option>--fallback</option>, <option>--repair</option>,
|
||||
<option>--no-build-output</option> / <option>-Q</option>,
|
||||
<option>--keep-failed</option> / <option>-K</option>,
|
||||
<option>--keep-going</option> / <option>-k</option> and <option>--verbose</option> /
|
||||
<option>-v</option>. See the Nix manual for details.
|
||||
|
||||
The following Nix flags that are support by the upcoming nix 2.4 version:
|
||||
<option>-L</option>, <option>--refresh</option>, <option>--no-net</option>,
|
||||
<option>--no-net</option>, <option>--impure</option>. See <command>nix --help</command> or <command>nix build --help</command> for details.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
@ -9,17 +9,9 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.command-not-found;
|
||||
commandNotFound = pkgs.substituteAll {
|
||||
name = "command-not-found";
|
||||
dir = "bin";
|
||||
src = ./command-not-found.pl;
|
||||
isExecutable = true;
|
||||
inherit (pkgs) perl;
|
||||
commandNotFound = pkgs.callPackage ./. {
|
||||
inherit (cfg) dbPath;
|
||||
perlFlags = concatStrings (map (path: "-I ${path}/${pkgs.perl.libPrefix} ")
|
||||
[ pkgs.perlPackages.DBI pkgs.perlPackages.DBDSQLite pkgs.perlPackages.StringShellQuote ]);
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -91,5 +83,4 @@ in
|
||||
|
||||
environment.systemPackages = [ commandNotFound ];
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
#! @perl@/bin/perl -w @perlFlags@
|
||||
|
||||
use strict;
|
||||
use DBI;
|
||||
use DBD::SQLite;
|
||||
use String::ShellQuote;
|
||||
use Config;
|
||||
|
||||
my $program = $ARGV[0];
|
||||
|
||||
my $dbPath = "@dbPath@";
|
||||
|
||||
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbPath", "", "")
|
||||
or die "cannot open database `$dbPath'";
|
||||
$dbh->{RaiseError} = 0;
|
||||
$dbh->{PrintError} = 0;
|
||||
|
||||
my $system = $ENV{"NIX_SYSTEM"} // $Config{myarchname};
|
||||
|
||||
my $res = $dbh->selectall_arrayref(
|
||||
"select package from Programs where system = ? and name = ?",
|
||||
{ Slice => {} }, $system, $program);
|
||||
|
||||
if (!defined $res || scalar @$res == 0) {
|
||||
print STDERR "$program: command not found\n";
|
||||
} elsif (scalar @$res == 1) {
|
||||
my $package = @$res[0]->{package};
|
||||
if ($ENV{"NIX_AUTO_INSTALL"} // "") {
|
||||
print STDERR <<EOF;
|
||||
The program ‘$program’ is currently not installed. It is provided by
|
||||
the package ‘$package’, which I will now install for you.
|
||||
EOF
|
||||
;
|
||||
exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
|
||||
} elsif ($ENV{"NIX_AUTO_RUN"} // "") {
|
||||
exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
|
||||
} else {
|
||||
print STDERR <<EOF;
|
||||
The program ‘$program’ is currently not installed. You can install it by typing:
|
||||
nix-env -iA nixos.$package
|
||||
EOF
|
||||
}
|
||||
} else {
|
||||
print STDERR <<EOF;
|
||||
The program ‘$program’ is currently not installed. It is provided by
|
||||
several packages. You can install it by typing one of the following:
|
||||
EOF
|
||||
print STDERR " nix-env -iA nixos.$_->{package}\n" foreach @$res;
|
||||
}
|
||||
|
||||
exit 127;
|
18
nixos/modules/programs/command-not-found/default.nix
Normal file
18
nixos/modules/programs/command-not-found/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ stdenv, rustPlatform, pkgconfig, sqlite
|
||||
, dbPath ? "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite" }:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "command-not-found";
|
||||
src = ./rust;
|
||||
|
||||
DB_PATH = dbPath;
|
||||
NIX_SYSTEM = stdenv.system;
|
||||
|
||||
postInstall = ''
|
||||
strip $out/bin/command-not-found
|
||||
'';
|
||||
|
||||
buildInputs = [ sqlite ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
cargoSha256 = "13q61bb4b1q40g424pbssyp3ln79q1a33vmyz9s9wlqnac34cibd";
|
||||
}
|
131
nixos/modules/programs/command-not-found/rust/Cargo.lock
generated
Normal file
131
nixos/modules/programs/command-not-found/rust/Cargo.lock
generated
Normal file
@ -0,0 +1,131 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "command-not-found"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"rusqlite 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fallible-iterator"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "fallible-streaming-iterator"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.70"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "lru-cache"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rusqlite"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fallible-streaming-iterator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libsqlite3-sys 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
"checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
|
||||
"checksum fallible-streaming-iterator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
||||
"checksum libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f"
|
||||
"checksum libsqlite3-sys 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e704a02bcaecd4a08b93a23f6be59d0bd79cd161e0963e9499165a0a35df7bd"
|
||||
"checksum linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
|
||||
"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
|
||||
"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
|
||||
"checksum rusqlite 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)" = "45d0fd62e1df63d254714e6cb40d0a0e82e7a1623e7a27f679d851af092ae58b"
|
||||
"checksum smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
|
||||
"checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
|
||||
"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
10
nixos/modules/programs/command-not-found/rust/Cargo.toml
Normal file
10
nixos/modules/programs/command-not-found/rust/Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "command-not-found"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
rusqlite = "0.*.*"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
52
nixos/modules/programs/command-not-found/rust/src/main.rs
Normal file
52
nixos/modules/programs/command-not-found/rust/src/main.rs
Normal file
@ -0,0 +1,52 @@
|
||||
use rusqlite::{params, Connection, Result};
|
||||
use std::env;
|
||||
use std::process::exit;
|
||||
|
||||
const NIX_SYSTEM: &str = env!("NIX_SYSTEM");
|
||||
const DB_PATH: &str = env!("DB_PATH");
|
||||
|
||||
fn query_packages(system: &str, program: &str) -> Result<Vec<String>> {
|
||||
Ok(Connection::open(DB_PATH)?
|
||||
.prepare("select package from Programs where system = ? and name = ?;")?
|
||||
.query_map(params![system, program], |row| row.get("package"))?
|
||||
.collect::<Result<Vec<String>>>()?)
|
||||
}
|
||||
|
||||
fn run_app() -> i32 {
|
||||
let args: Vec<_> = env::args().collect();
|
||||
if args.len() < 2 {
|
||||
eprintln!("USAGE: {} PROGRAMNAME", args[0]);
|
||||
return 1;
|
||||
}
|
||||
let program = &args[1];
|
||||
let system = env::var("NIX_SYSTEM").unwrap_or_else(|_| NIX_SYSTEM.to_string());
|
||||
let packages = match query_packages(&system, program) {
|
||||
Ok(packages) => packages,
|
||||
Err(err) => {
|
||||
eprintln!("Failed to query package database: {}", err);
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
if packages.is_empty() {
|
||||
eprintln!("{}: command not found", program);
|
||||
} else {
|
||||
let advice = if packages.len() > 1 {
|
||||
"It is provided by several packages. You can install it by typing on of the of following commands:"
|
||||
} else {
|
||||
"You can install it by typing:"
|
||||
};
|
||||
eprintln!(
|
||||
"The program '{}' is currently not installed. {}",
|
||||
program, advice
|
||||
);
|
||||
for pkg in packages {
|
||||
eprintln!(" nix-env -iA nixos.{}", pkg);
|
||||
}
|
||||
}
|
||||
|
||||
127
|
||||
}
|
||||
|
||||
fn main() {
|
||||
exit(run_app());
|
||||
}
|
@ -12,7 +12,7 @@ let
|
||||
${condOption "bind" cfg.bind}
|
||||
${condOption "unixsocket" cfg.unixSocket}
|
||||
daemonize no
|
||||
supervised systemd
|
||||
#supervised systemd
|
||||
loglevel ${cfg.logLevel}
|
||||
logfile ${cfg.logfile}
|
||||
syslog-enabled ${redisBool cfg.syslog}
|
||||
@ -242,7 +242,9 @@ in
|
||||
ExecStart = "${cfg.package}/bin/redis-server /run/redis/redis.conf";
|
||||
RuntimeDirectory = "redis";
|
||||
StateDirectory = "redis";
|
||||
Type = "notify";
|
||||
TimeoutStartSec = "infinity";
|
||||
TimeoutStopSec = "infinity";
|
||||
Type = "simple";
|
||||
User = "redis";
|
||||
Group = "redis";
|
||||
};
|
||||
|
@ -62,6 +62,17 @@ let
|
||||
lovelace.mode = "yaml";
|
||||
};
|
||||
|
||||
#pythonScripts = pkgs.runCommand "python_scripts" {
|
||||
# nativeBuildInputs = [ pkgs.python3 ];
|
||||
# scripts = cfg.pythonScripts;
|
||||
#} ''
|
||||
# mkdir $out
|
||||
# for s in $scripts; do
|
||||
# echo "checking syntax of $s"
|
||||
# python -m py_compile "$s"
|
||||
# ln -s "$s" "$out/$(basename $s"
|
||||
# done
|
||||
#'';
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ dotlambda ];
|
||||
|
||||
@ -214,6 +225,17 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
pythonScripts = mkOption {
|
||||
#default = [];
|
||||
#type = types.listOf types.path;
|
||||
default = null;
|
||||
type = types.nullOr types.path;
|
||||
description = ''
|
||||
List of python scripts to use in the <literal>python_scripts</literal> integration.
|
||||
Also see in the <link xlink:href="https://www.home-assistant.io/integrations/python_script">Homeassistant documentation</link>
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
@ -224,6 +246,12 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
|
||||
|
||||
systemd.tmpfiles.rules = mkIf (cfg.pythonScripts != null) [
|
||||
"L+ ${cfg.configDir}/python_scripts - - - - ${cfg.pythonScripts}"
|
||||
];
|
||||
|
||||
services.home-assistant.config.python_script = mkIf (cfg.pythonScripts != null) {};
|
||||
|
||||
systemd.services.home-assistant = {
|
||||
description = "Home Assistant";
|
||||
after = [ "network.target" ];
|
||||
|
@ -11,6 +11,7 @@ let
|
||||
nixVersion = getVersion nix;
|
||||
|
||||
isNix23 = versionAtLeast nixVersion "2.3pre";
|
||||
isNix24 = versionAtLeast nixVersion "2.4pre";
|
||||
|
||||
makeNixBuildUser = nr: {
|
||||
name = "nixbld${toString nr}";
|
||||
@ -40,7 +41,11 @@ let
|
||||
max-jobs = ${toString (cfg.maxJobs)}
|
||||
cores = ${toString (cfg.buildCores)}
|
||||
sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox}
|
||||
extra-sandbox-paths = ${toString cfg.sandboxPaths}
|
||||
|
||||
${optionalString (!isNix24) ''
|
||||
extra-sandbox-paths = ${toString cfg.sandboxPaths}
|
||||
''}
|
||||
|
||||
substituters = ${toString cfg.binaryCaches}
|
||||
trusted-substituters = ${toString cfg.trustedBinaryCaches}
|
||||
trusted-public-keys = ${toString cfg.binaryCachePublicKeys}
|
||||
|
@ -16,7 +16,7 @@ let
|
||||
${concatMapStrings (f: "actionsfile ${f}\n") cfg.actionsFiles}
|
||||
${concatMapStrings (f: "filterfile ${f}\n") cfg.filterFiles}
|
||||
'' + optionalString cfg.enableTor ''
|
||||
forward-socks4a / ${config.services.tor.client.socksListenAddressFaster} .
|
||||
forward-socks5t / 127.0.0.1:9063 .
|
||||
toggle 1
|
||||
enable-remote-toggle 0
|
||||
enable-edit-actions 0
|
||||
@ -123,6 +123,11 @@ in
|
||||
serviceConfig.ProtectSystem = "full";
|
||||
};
|
||||
|
||||
services.tor.settings.SOCKSPort = mkIf cfg.enableTor [
|
||||
# Route HTTP traffic over a faster port (without IsolateDestAddr).
|
||||
{ addr = "127.0.0.1"; port = 9063; IsolateDestAddr = false; }
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -50,10 +50,20 @@ in
|
||||
systemd.services.nscd =
|
||||
{ description = "Name Service Cache Daemon";
|
||||
|
||||
wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ];
|
||||
|
||||
environment = { LD_LIBRARY_PATH = nssModulesPath; };
|
||||
|
||||
# We need system users to be resolveable in late-boot. nscd is the proxy between
|
||||
# nss-modules in NixOS and thus if you have nss-modules providing system users
|
||||
# (e.g. when using DynamicUser) then nscd needs to be available before late-boot is ready
|
||||
# We add a dependency of sysinit.target to nscd to ensure
|
||||
# these units are started after nscd is fully started.
|
||||
unitConfig.DefaultDependencies = false;
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
wants = [ "local-fs.target" ];
|
||||
after = [ "local-fs.target" ];
|
||||
|
||||
restartTriggers = [
|
||||
config.environment.etc.hosts.source
|
||||
config.environment.etc."nsswitch.conf".source
|
||||
@ -66,20 +76,19 @@ in
|
||||
# privileges after all the NSS modules have read their configuration
|
||||
# files. So prefix the ExecStart command with "!" to prevent systemd
|
||||
# from dropping privileges early. See ExecStart in systemd.service(5).
|
||||
serviceConfig =
|
||||
{ ExecStart = "!@${nscd}/sbin/nscd nscd";
|
||||
Type = "forking";
|
||||
DynamicUser = true;
|
||||
RuntimeDirectory = "nscd";
|
||||
PIDFile = "/run/nscd/nscd.pid";
|
||||
Restart = "always";
|
||||
ExecReload =
|
||||
[ "${nscd}/sbin/nscd --invalidate passwd"
|
||||
"${nscd}/sbin/nscd --invalidate group"
|
||||
"${nscd}/sbin/nscd --invalidate hosts"
|
||||
];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "!@${nscd}/sbin/nscd nscd";
|
||||
Type = "forking";
|
||||
DynamicUser = true;
|
||||
RuntimeDirectory = "nscd";
|
||||
PIDFile = "/run/nscd/nscd.pid";
|
||||
Restart = "always";
|
||||
ExecReload = [
|
||||
"${nscd}/sbin/nscd --invalidate passwd"
|
||||
"${nscd}/sbin/nscd --invalidate group"
|
||||
"${nscd}/sbin/nscd --invalidate hosts"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -179,6 +179,12 @@ let
|
||||
${cfg.httpConfig}
|
||||
}''}
|
||||
|
||||
${optionalString (cfg.streamConfig != "") ''
|
||||
stream {
|
||||
${cfg.streamConfig}
|
||||
}
|
||||
''}
|
||||
|
||||
${cfg.appendConfig}
|
||||
'';
|
||||
|
||||
@ -452,6 +458,21 @@ in
|
||||
";
|
||||
};
|
||||
|
||||
streamConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
server {
|
||||
listen 127.0.0.1:53 udp reuseport;
|
||||
proxy_timeout 20s;
|
||||
proxy_pass 192.168.0.1:53535;
|
||||
}
|
||||
'';
|
||||
description = "
|
||||
Configuration lines to be set inside the stream block.
|
||||
";
|
||||
};
|
||||
|
||||
eventsConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
@ -346,10 +346,11 @@ sub filterUnits {
|
||||
return @res;
|
||||
}
|
||||
|
||||
my $startNscd = delete $unitsToStart{"nscd.service"};
|
||||
|
||||
my @unitsToStopFiltered = filterUnits(\%unitsToStop);
|
||||
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
||||
|
||||
|
||||
# Show dry-run actions.
|
||||
if ($action eq "dry-activate") {
|
||||
print STDERR "would stop the following units: ", join(", ", @unitsToStopFiltered), "\n"
|
||||
@ -359,6 +360,7 @@ if ($action eq "dry-activate") {
|
||||
print STDERR "would restart systemd\n" if $restartSystemd;
|
||||
print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"
|
||||
if scalar(keys %unitsToRestart) > 0;
|
||||
print STDERR "would start nscd\n" if $startNscd;
|
||||
print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
||||
if scalar @unitsToStartFiltered;
|
||||
print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
|
||||
@ -418,6 +420,13 @@ close $listActiveUsers;
|
||||
print STDERR "setting up tmpfiles\n";
|
||||
system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
|
||||
|
||||
# We need to start nscd before any other service, since they might need
|
||||
# to resolve users/groups only exposed by nss modules (i.e. DynamicUser via nss_systemd)
|
||||
if ($startNscd) {
|
||||
print STDERR "starting nscd\n";
|
||||
system("@systemd@/bin/systemctl", "start", "nscd.service") == 0 or $res = 4;
|
||||
}
|
||||
|
||||
# Reload units that need it. This includes remounting changed mount
|
||||
# units.
|
||||
if (scalar(keys %unitsToReload) > 0) {
|
||||
|
@ -366,7 +366,7 @@ let
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
tmp=$(mktemp -d initrd-secrets.XXXXXXXXXX)
|
||||
tmp=$(mktemp -d ''${TMPDIR:-/tmp}/initrd-secrets.XXXXXXXXXX)
|
||||
|
||||
${lib.concatStringsSep "\n" (mapAttrsToList (dest: source:
|
||||
let source' = if source == null then dest else toString source; in
|
||||
|
@ -7,8 +7,9 @@ let
|
||||
|
||||
addCheckDesc = desc: elemType: check: types.addCheck elemType check
|
||||
// { description = "${elemType.description} (with check: ${desc})"; };
|
||||
nonEmptyStr = addCheckDesc "non-empty" types.str
|
||||
(x: x != "" && ! (all (c: c == " " || c == "\t") (stringToCharacters x)));
|
||||
|
||||
isNonEmpty = s: (builtins.match ".*[^ \t]+.*" s) != null;
|
||||
nonEmptyStr = addCheckDesc "non-empty" types.str isNonEmpty;
|
||||
|
||||
fileSystems' = toposort fsBefore (attrValues config.fileSystems);
|
||||
|
||||
@ -28,10 +29,10 @@ let
|
||||
coreFileSystemOpts = { name, config, ... }: {
|
||||
|
||||
options = {
|
||||
|
||||
mountPoint = mkOption {
|
||||
example = "/mnt/usb";
|
||||
type = nonEmptyStr;
|
||||
type = addCheckDesc "non-empty without trailing slash" types.str
|
||||
(s: isNonEmpty s && (builtins.match "(/|/.*[^/])" s) != null);
|
||||
description = "Location of the mounted the file system.";
|
||||
};
|
||||
|
||||
|
@ -137,7 +137,7 @@ in
|
||||
services.openssh.permitRootLogin = "prohibit-password";
|
||||
|
||||
# Creates symlinks for block device names.
|
||||
services.udev.packages = [ pkgs.ec2-utils ];
|
||||
services.udev.packages = [ pkgs.amazon-ec2-utils ];
|
||||
|
||||
# Force getting the hostname from EC2.
|
||||
networking.hostName = mkDefault "";
|
||||
|
@ -17,7 +17,7 @@ rec {
|
||||
environment.systemPackages = with pkgs; [ netcat ];
|
||||
services.tor.enable = true;
|
||||
services.tor.client.enable = true;
|
||||
services.tor.controlPort = 9051;
|
||||
services.tor.settings.ControlPort = 9051;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 5dd2593369645b11a9dc03e1930617d2f5dbd039 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Wed, 11 Nov 2020 11:48:49 +0100
|
||||
Subject: [PATCH] hardcode json file path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
||||
---
|
||||
wee_slack.py | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/wee_slack.py b/wee_slack.py
|
||||
index a3d779c..5942289 100644
|
||||
--- a/wee_slack.py
|
||||
+++ b/wee_slack.py
|
||||
@@ -5136,13 +5136,7 @@ def create_slack_debug_buffer():
|
||||
|
||||
def load_emoji():
|
||||
try:
|
||||
- weechat_dir = w.info_get('weechat_dir', '')
|
||||
- weechat_sharedir = w.info_get('weechat_sharedir', '')
|
||||
- local_weemoji, global_weemoji = ('{}/weemoji.json'.format(path)
|
||||
- for path in (weechat_dir, weechat_sharedir))
|
||||
- path = (global_weemoji if os.path.exists(global_weemoji) and
|
||||
- not os.path.exists(local_weemoji) else local_weemoji)
|
||||
- with open(path, 'r') as ef:
|
||||
+ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
|
||||
emojis = json.loads(ef.read())
|
||||
if 'emoji' in emojis:
|
||||
print_error('The weemoji.json file is in an old format. Please update it.')
|
||||
--
|
||||
2.29.0
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wee-slack";
|
||||
version = "2.6.0";
|
||||
version = "8bd734c8e9a6b133a65548672f8a11ee3b3ce677";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "wee-slack";
|
||||
owner = "wee-slack";
|
||||
rev = "v${version}";
|
||||
sha256 = "0s4qd1z40c1bczkvc840jwjmzbv7nyj06xqs1si9v54qmkh4gaq4";
|
||||
rev = version;
|
||||
sha256 = "0p48cpaqfqja9i68dqyladwif7x8c19ii8v27p9cxz5y9impc9qk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
paths = with python3Packages; [ websocket_client six ];
|
||||
}}/${python3Packages.python.sitePackages}";
|
||||
})
|
||||
./hardcode-json-file-path.patch
|
||||
./0001-hardcode-json-file-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/wee_slack.py
|
||||
+++ b/wee_slack.py
|
||||
@@ -4560,8 +4560,7 @@
|
||||
|
||||
def load_emoji():
|
||||
try:
|
||||
- DIR = w.info_get('weechat_dir', '')
|
||||
- with open('{}/weemoji.json'.format(DIR), 'r') as ef:
|
||||
+ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
|
||||
emojis = json.loads(ef.read())
|
||||
if 'emoji' in emojis:
|
||||
print_error('The weemoji.json file is in an old format. Please update it.')
|
26
pkgs/applications/video/iina/default.nix
Normal file
26
pkgs/applications/video/iina/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ stdenv, fetchurl, undmg }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "iina";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/iina/iina/releases/download/v1.0.7-beta2/IINA.v1.0.7-beta2.dmg";
|
||||
sha256 = "1w0l3b1kar9zglqkildcqhlwara6zy2p3x79kqa2d0b43nqka82n";
|
||||
};
|
||||
|
||||
buildInputs = [ undmg ];
|
||||
installPhase = ''
|
||||
mkdir -p "$out/Applications/IINA.app"
|
||||
cp -R . "$out/Applications/IINA.app"
|
||||
chmod +x "$out/Applications/IINA.app/Contents/MacOS/IINA"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The modern video player for macOS.";
|
||||
homepage = "http://https://iina.io/";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.darwin;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
};
|
||||
}
|
16
pkgs/development/python-modules/keystone/default.nix
Normal file
16
pkgs/development/python-modules/keystone/default.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, keystone
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
inherit (keystone) pname src version buildInputs nativeBuildInputs;
|
||||
|
||||
dontUseCmakeConfigure = 1;
|
||||
preBuild = "cd bindings/python";
|
||||
|
||||
meta = with lib; {
|
||||
inherit (keystone.meta) description license homepage;
|
||||
maintainers = [ maintainers.mic92 ];
|
||||
};
|
||||
}
|
31
pkgs/development/python-modules/pyworld/default.nix
Normal file
31
pkgs/development/python-modules/pyworld/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, numpy
|
||||
, cython
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyworld";
|
||||
version = "0.2.12";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "896c910696975855578d855f490f94d7a57119e0a75f7f15e11fdf58ba891627";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PyWorld is a Python wrapper for WORLD vocoder";
|
||||
homepage = https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.mic92 ];
|
||||
};
|
||||
}
|
@ -14,13 +14,9 @@ source 'https://rubygems.org' do
|
||||
gem 'cocoapods'
|
||||
gem 'cocoapods-acknowledgements'
|
||||
gem 'cocoapods-art'
|
||||
gem 'cocoapods-bin'
|
||||
gem 'cocoapods-browser'
|
||||
gem 'cocoapods-bugsnag'
|
||||
gem 'cocoapods-check'
|
||||
gem 'cocoapods-clean'
|
||||
gem 'cocoapods-clean_build_phases_scripts'
|
||||
gem 'cocoapods-core'
|
||||
gem 'cocoapods-coverage'
|
||||
gem 'cocoapods-deintegrate'
|
||||
gem 'cocoapods-dependencies'
|
||||
@ -31,18 +27,9 @@ source 'https://rubygems.org' do
|
||||
gem 'cocoapods-generate'
|
||||
gem 'cocoapods-git_url_rewriter'
|
||||
gem 'cocoapods-keys'
|
||||
gem 'cocoapods-no-dev-schemes'
|
||||
gem 'cocoapods-open'
|
||||
gem 'cocoapods-packager'
|
||||
gem 'cocoapods-playgrounds'
|
||||
gem 'cocoapods-plugins'
|
||||
gem 'cocoapods-prune-localizations'
|
||||
gem 'cocoapods-rome'
|
||||
gem 'cocoapods-search'
|
||||
gem 'cocoapods-sorted-search'
|
||||
gem 'cocoapods-static-swift-framework'
|
||||
gem 'cocoapods-stats'
|
||||
gem 'cocoapods-tdfire-binary'
|
||||
gem 'cocoapods-testing'
|
||||
gem 'cocoapods-trunk'
|
||||
gem 'cocoapods-try'
|
||||
|
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
||||
description = "A tracepoint-based system tracing tool for Linux (with clients for other OSes)";
|
||||
license = with licenses; [ asl20 gpl2 mit ];
|
||||
maintainers = [maintainers.raskin];
|
||||
platforms = ["x86_64-linux"] ++ platforms.darwin;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ] ++ platforms.darwin;
|
||||
broken = kernel != null && versionOlder kernel.version "4.14";
|
||||
homepage = "https://sysdig.com/opensource/";
|
||||
downloadPage = "https://github.com/draios/sysdig/releases";
|
||||
|
@ -243,7 +243,7 @@
|
||||
"familyhub" = ps: with ps; [ ]; # missing inputs: python-family-hub-local
|
||||
"fan" = ps: with ps; [ ];
|
||||
"fastdotcom" = ps: with ps; [ ]; # missing inputs: fastdotcom
|
||||
"feedreader" = ps: with ps; [ ]; # missing inputs: feedparser-homeassistant
|
||||
"feedreader" = ps: with ps; [ feedparser];
|
||||
"ffmpeg" = ps: with ps; [ ha-ffmpeg ];
|
||||
"ffmpeg_motion" = ps: with ps; [ ha-ffmpeg ];
|
||||
"ffmpeg_noise" = ps: with ps; [ ha-ffmpeg ];
|
||||
|
@ -41,6 +41,10 @@ PKG_PREFERENCES = {
|
||||
"tensorflow-build_2": "tensorflow",
|
||||
}
|
||||
|
||||
# packages we have a different name for or we want to replace
|
||||
PKG_SUBSTITUTES = {
|
||||
"feedparser-homeassistant": "feedparser"
|
||||
}
|
||||
|
||||
def run_mypy() -> None:
|
||||
cmd = ["mypy", "--ignore-missing-imports", __file__]
|
||||
@ -156,6 +160,8 @@ def main() -> None:
|
||||
# Therefore, if there's a "#" in the line, only take the part after it
|
||||
req = req[req.find("#") + 1 :]
|
||||
name = req.split("==")[0]
|
||||
name = PKG_SUBSTITUTES.get(name, name)
|
||||
|
||||
attr_path = name_to_attr_path(name, packages)
|
||||
if attr_path is not None:
|
||||
# Add attribute path without "python3Packages." prefix
|
||||
|
@ -100,6 +100,7 @@ in stdenv.mkDerivation {
|
||||
homepage = "https://www.openafs.org";
|
||||
license = licenses.ipl10;
|
||||
platforms = platforms.linux;
|
||||
broken = with kernel; kernelOlder "3.18" || isHardened;
|
||||
maintainers = [ maintainers.maggesi maintainers.spacefrogg ];
|
||||
};
|
||||
}
|
||||
|
@ -61,6 +61,18 @@ python3Packages.buildPythonApplication rec {
|
||||
url = "https://github.com/mozilla/TTS/commit/36fee428b9f3f4ec1914b090a2ec9d785314d9aa.patch";
|
||||
sha256 = "sha256-pP0NxiyrsvQ0A7GEleTdT87XO08o7WxPEpb6Bmj66dc=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Mic92/TTS/commit/5bf62009e8c19e8c1627d1f7aa54e11bc5fa91d7.patch";
|
||||
sha256 = "sha256-ZxDytieD0zoP0/RXzG0bbVnl0oE+DF8iUVpHb8+2TqM=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mozilla/TTS/commit/3000647e542fce9773f4c5da082630befa5525f1.patch";
|
||||
sha256 = "sha256-dl8Zy0dEw9z4ZZFcuP1WHzCVh2+nn0jDKOncoCK+syM=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mozilla/TTS/commit/fe86a076bb1c7e18078718be0aa36da427f325bd.patch";
|
||||
sha256 = "sha256-cT5HYkLFzmSMwAHLOHgpG+v9HGKIbUxwS8Dt9SKHm+8=";
|
||||
})
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
@ -95,6 +107,7 @@ python3Packages.buildPythonApplication rec {
|
||||
inflect
|
||||
gdown
|
||||
pysbd
|
||||
pyworld
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libevent, openssl, zlib, torsocks
|
||||
, libseccomp, systemd, libcap, lzma, zstd, scrypt, nixosTests
|
||||
, writeShellScript
|
||||
|
||||
# for update.nix
|
||||
, writeScript
|
||||
@ -12,7 +13,21 @@
|
||||
, gnused
|
||||
, nix
|
||||
}:
|
||||
let
|
||||
tor-client-auth-gen = writeShellScript "tor-client-auth-gen" ''
|
||||
PATH="${stdenv.lib.makeBinPath [coreutils gnugrep openssl]}"
|
||||
pem="$(openssl genpkey -algorithm x25519)"
|
||||
|
||||
printf private_key=descriptor:x25519:
|
||||
echo "$pem" | grep -v " PRIVATE KEY" |
|
||||
base64 -d | tail --bytes=32 | base32 | tr -d =
|
||||
|
||||
printf public_key=descriptor:x25519:
|
||||
echo "$pem" | openssl pkey -in /dev/stdin -pubout |
|
||||
grep -v " PUBLIC KEY" |
|
||||
base64 -d | tail --bytes=32 | base32 | tr -d =
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tor";
|
||||
version = "0.4.4.6";
|
||||
@ -52,6 +67,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $geoip/share/tor
|
||||
mv $out/share/tor/geoip{,6} $geoip/share/tor
|
||||
rm -rf $out/share/tor
|
||||
ln -s ${tor-client-auth-gen} $out/bin/tor-client-auth-gen
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
, texlive
|
||||
, zlib, libiconv, libpng, libX11
|
||||
, freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
|
||||
, perl, perlPackages, python2Packages, pkgconfig
|
||||
, perl, perlPackages, python3Packages, pkgconfig
|
||||
, poppler, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr
|
||||
, brotli, cairo, pixman, xorg, clisp, biber, woff2, xxHash
|
||||
, makeWrapper, shortenPerlShebang
|
||||
@ -321,13 +321,13 @@ latexindent = perlPackages.buildPerlPackage rec {
|
||||
};
|
||||
|
||||
|
||||
pygmentex = python2Packages.buildPythonApplication rec {
|
||||
pygmentex = python3Packages.buildPythonApplication rec {
|
||||
pname = "pygmentex";
|
||||
inherit (src) version;
|
||||
|
||||
src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.pygmentex.pkgs);
|
||||
|
||||
propagatedBuildInputs = with python2Packages; [ pygments chardet ];
|
||||
propagatedBuildInputs = with python3Packages; [ pygments chardet ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
|
@ -27,7 +27,7 @@ let
|
||||
[ "de-macro" "pythontex" "dviasm" "texliveonfly" ];
|
||||
pkgNeedsRuby = pkg: pkg.tlType == "run" && pkg.pname == "match-parens";
|
||||
extraInputs =
|
||||
lib.optional (lib.any pkgNeedsPython splitBin.wrong) python
|
||||
lib.optional (lib.any pkgNeedsPython splitBin.wrong) python3
|
||||
++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby;
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
{ stdenv, lib, fetchurl, runCommand, writeText, buildEnv
|
||||
, callPackage, ghostscriptX, harfbuzz, poppler_min
|
||||
, makeWrapper, python, ruby, perl
|
||||
, makeWrapper, python3, ruby, perl
|
||||
, useFixedHashes ? true
|
||||
, recurseIntoAttrs
|
||||
}:
|
||||
@ -25,7 +25,7 @@ let
|
||||
# function for creating a working environment from a set of TL packages
|
||||
combine = import ./combine.nix {
|
||||
inherit bin combinePkgs buildEnv lib makeWrapper writeText
|
||||
stdenv python ruby perl;
|
||||
stdenv python3 ruby perl;
|
||||
ghostscript = ghostscriptX; # could be without X, probably, but we use X above
|
||||
};
|
||||
|
||||
@ -110,7 +110,7 @@ let
|
||||
#"ftp://tug.org/texlive/historic/2019/tlnet-final/archive"
|
||||
|
||||
# Daily snapshots hosted by one of the texlive release managers
|
||||
https://texlive.info/tlnet-archive/2020/10/09/tlnet/archive
|
||||
"https://texlive.info/tlnet-archive/2020/10/09/tlnet/archive"
|
||||
];
|
||||
|
||||
src = fetchurl { inherit urls sha512; };
|
||||
|
42
pkgs/tools/virtualization/amazon-ec2-utils/default.nix
Normal file
42
pkgs/tools/virtualization/amazon-ec2-utils/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ stdenv, lib, fetchFromGitHub, python3, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "amazon-ec2-utils";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "amazon-ec2-utils";
|
||||
rev = version;
|
||||
sha256 = "sha256-uxKnbdKGhS32kY3mA7YYtDRwKcEjNZPJUYQExZTqtxE=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
# TODO next version will have manpages
|
||||
#nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
installPhase = ''
|
||||
# https://github.com/aws/amazon-ec2-utils/blob/8eb2effb1aea2280264d66ae58b3e156e6d429f9/amazon-ec2-utils.spec#L74
|
||||
install -D --target $out/etc/udev/rules.d *.rules
|
||||
install -D --target $out/bin ec2-metadata ebsnvme-id ec2udev-vbd ec2udev-vcpu
|
||||
install -D --target $out/lib/udev/ ec2nvme-nsid
|
||||
# TODO next version will have manpages
|
||||
#installManPage doc/*
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for i in $out/etc/udev/rules.d/*.rules; do
|
||||
substituteInPlace "$i" \
|
||||
--replace '/sbin' "$out/bin"
|
||||
done
|
||||
substituteInPlace "$out/etc/udev/rules.d/70-ec2-nvme-devices.rules" \
|
||||
--replace 'ec2nvme-nsid' "$out/lib/udev/ec2nvme-nsid"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A set of tools for running in EC2";
|
||||
homepage = "https://aws.amazon.com/amazon-linux-ami/";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ thefloweringash ];
|
||||
};
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
{ stdenv, lib, rpmextract, fetchurl, python2, tree }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ec2-utils";
|
||||
version = "0.5.1";
|
||||
|
||||
# The url can be determined by booting an "Amazon Linux 2" and running:
|
||||
# > yumdownloader --urls ec2-utils
|
||||
src = fetchurl {
|
||||
url = "http://amazonlinux.ap-northeast-1.amazonaws.com/blobstore/a3b4d2c35c2300518fe10381a05b3bd7936ff5cdd3d351143a11bf84073d9e00/ec2-utils-0.5-1.amzn2.0.1.noarch.rpm";
|
||||
sha256 = "004y7l3q9gqi78a53lykrpsnz4yp7dds1083w67m2013bk1x5d53";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ rpmextract ];
|
||||
|
||||
buildInputs = [ python2 ];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir source
|
||||
cd source
|
||||
rpmextract "$src"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
|
||||
mv --target-directory $out \
|
||||
etc sbin usr/bin usr/lib
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for i in $out/etc/udev/rules.d/*.rules; do
|
||||
substituteInPlace "$i" \
|
||||
--replace '/sbin' "$out/bin"
|
||||
done
|
||||
|
||||
substituteInPlace "$out/etc/udev/rules.d/70-ec2-nvme-devices.rules" \
|
||||
--replace 'ec2nvme-nsid' "$out/lib/udev/ec2nvme-nsid"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A set of tools for running in EC2";
|
||||
homepage = "https://aws.amazon.com/amazon-linux-ami/";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ thefloweringash ];
|
||||
};
|
||||
}
|
@ -138,6 +138,7 @@ mapAliases ({
|
||||
draftsight = throw "draftsight has been removed, no longer available as freeware"; # added 2020-08-14
|
||||
dvb_apps = throw "dvb_apps has been removed."; # added 2020-11-03
|
||||
dwarf_fortress = dwarf-fortress; # added 2016-01-23
|
||||
ec2-utils = amazon-ec2-utils; # added 2020-12-06
|
||||
emacsPackagesGen = emacsPackagesFor; # added 2018-08-18
|
||||
emacsPackagesNgGen = emacsPackagesFor; # added 2018-08-18
|
||||
emacsPackagesNgFor = emacsPackagesFor; # added 2019-08-07
|
||||
|
@ -1005,7 +1005,7 @@ in
|
||||
|
||||
ec2_ami_tools = callPackage ../tools/virtualization/ec2-ami-tools { };
|
||||
|
||||
ec2-utils = callPackage ../tools/virtualization/ec2-utils { };
|
||||
amazon-ec2-utils = callPackage ../tools/virtualization/amazon-ec2-utils { };
|
||||
|
||||
exoscale-cli = callPackage ../tools/admin/exoscale-cli { };
|
||||
|
||||
@ -21305,6 +21305,8 @@ in
|
||||
|
||||
icesl = callPackage ../applications/misc/icesl { };
|
||||
|
||||
iina = callPackage ../applications/video/iina { };
|
||||
|
||||
keepassx = callPackage ../applications/misc/keepassx { };
|
||||
keepassx2 = callPackage ../applications/misc/keepassx/2.0.nix { };
|
||||
keepassxc = libsForQt5.callPackage ../applications/misc/keepassx/community.nix { };
|
||||
|
@ -3312,6 +3312,10 @@ in {
|
||||
|
||||
keyrings-alt = callPackage ../development/python-modules/keyrings-alt { };
|
||||
|
||||
keystone = callPackage ../development/python-modules/keystone {
|
||||
inherit (pkgs) keystone;
|
||||
};
|
||||
|
||||
keyutils = callPackage ../development/python-modules/keyutils { inherit (pkgs) keyutils; };
|
||||
|
||||
kicad = disabledIf isPy27 (toPythonModule (pkgs.kicad.override { python3 = python; }).src);
|
||||
@ -6216,6 +6220,8 @@ in {
|
||||
});
|
||||
in if isPy3k then pyxattr' else pyxattr_2;
|
||||
|
||||
pyworld = callPackage ../development/python-modules/pyworld { };
|
||||
|
||||
pyx = callPackage ../development/python-modules/pyx { };
|
||||
|
||||
pyxdg = callPackage ../development/python-modules/pyxdg { };
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user