Merge remote-tracking branch 'ni/nixpkgs-18.03-fix-strip' into staging/18.03
This commit is contained in:
commit
28a5973451
@ -1,25 +0,0 @@
|
|||||||
{ mkDerivation, attoparsec, base, containers, Diff, fetchgit, mtl
|
|
||||||
, nix-derivation, optparse-generic, stdenv, system-filepath, text
|
|
||||||
, unix, vector
|
|
||||||
}:
|
|
||||||
mkDerivation {
|
|
||||||
pname = "nix-diff";
|
|
||||||
version = "1.0.0-krebs1";
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/Gabriel439/nix-diff";
|
|
||||||
sha256 = "1k00nx8pannqmpzadkwfrs6bf79yk22ynhd033z5rsyw0m8fcz9k";
|
|
||||||
rev = "e32ffa2c7f38b47a71325a042c1d887fb46cdf7d";
|
|
||||||
};
|
|
||||||
patches = [
|
|
||||||
./nixos-system.patch
|
|
||||||
];
|
|
||||||
isLibrary = false;
|
|
||||||
isExecutable = true;
|
|
||||||
executableHaskellDepends = [
|
|
||||||
attoparsec base containers Diff mtl nix-derivation optparse-generic
|
|
||||||
system-filepath text unix vector
|
|
||||||
];
|
|
||||||
homepage = "https://github.com/Gabriel439/nix-diff";
|
|
||||||
description = "Explain why two Nix derivations differ";
|
|
||||||
license = stdenv.lib.licenses.bsd3;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/src/Main.hs b/src/Main.hs
|
|
||||||
index 959ab8e..d3b6077 100644
|
|
||||||
--- a/src/Main.hs
|
|
||||||
+++ b/src/Main.hs
|
|
||||||
@@ -95,7 +95,12 @@ pathToText path =
|
|
||||||
underneath `/nix/store`, but this is the overwhelmingly common use case
|
|
||||||
-}
|
|
||||||
derivationName :: FilePath -> Text
|
|
||||||
-derivationName = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText
|
|
||||||
+derivationName p =
|
|
||||||
+ if Data.Text.isPrefixOf "nixos-system" s
|
|
||||||
+ then "nixos-system"
|
|
||||||
+ else s
|
|
||||||
+ where
|
|
||||||
+ s = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText $ p
|
|
||||||
|
|
||||||
-- | Group input derivations by their name
|
|
||||||
groupByName :: Map FilePath (Set Text) -> Map Text (Map FilePath (Set Text))
|
|
7
krebs/5pkgs/simple/kops.nix
Normal file
7
krebs/5pkgs/simple/kops.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ fetchgit, ... }:
|
||||||
|
|
||||||
|
fetchgit {
|
||||||
|
url = https://cgit.krebsco.de/kops;
|
||||||
|
rev = "refs/tags/v1.0.0";
|
||||||
|
sha256 = "0wg8d80sxa46z4i7ir79sci2hwmv3qskzqdg0si64p6vazy8vckb";
|
||||||
|
}
|
@ -9,7 +9,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmds.deploy = pkgs.withGetopt {
|
cmds.deploy = pkgs.withGetopt {
|
||||||
diff = { default = /* sh */ "false"; switch = true; };
|
|
||||||
force-populate = { default = /* sh */ "false"; switch = true; };
|
force-populate = { default = /* sh */ "false"; switch = true; };
|
||||||
quiet = { default = /* sh */ "false"; switch = true; };
|
quiet = { default = /* sh */ "false"; switch = true; };
|
||||||
source_file = {
|
source_file = {
|
||||||
@ -25,65 +24,6 @@
|
|||||||
. ${init.env}
|
. ${init.env}
|
||||||
. ${init.proxy "deploy" opts}
|
. ${init.proxy "deploy" opts}
|
||||||
|
|
||||||
if \test ${opts.diff.ref} = true; then
|
|
||||||
|
|
||||||
system_profile=/nix/var/nix/profiles/system
|
|
||||||
system_drv_cur=/etc/system.drv
|
|
||||||
|
|
||||||
system_drv_new=$(
|
|
||||||
${pkgs.nix}/bin/nix-instantiate \
|
|
||||||
-Q \
|
|
||||||
-I "$target_path" \
|
|
||||||
-E '
|
|
||||||
(import <nixpkgs/nixos/lib/eval-config.nix> {
|
|
||||||
modules = [ <nixos-config> ];
|
|
||||||
}).config.system.build.toplevel
|
|
||||||
'
|
|
||||||
)
|
|
||||||
|
|
||||||
if \test -e "$system_drv_cur"; then
|
|
||||||
|
|
||||||
system_drv_cur_c=$(${pkgs.coreutils}/bin/readlink -f "$system_drv_cur")
|
|
||||||
system_drv_new_c=$(${pkgs.coreutils}/bin/readlink -f "$system_drv_new")
|
|
||||||
|
|
||||||
if \test "$system_drv_cur_c" = "$system_drv_new_c"; then
|
|
||||||
echo "$0: system up to date" >&2
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
system_drv_cur=$system_drv_cur_c \
|
|
||||||
system_drv_new=$system_drv_new_c \
|
|
||||||
${pkgs.utillinux}/bin/script \
|
|
||||||
--command '
|
|
||||||
${pkgs.haskellPackages.nix-diff}/bin/nix-diff \
|
|
||||||
"$system_drv_cur" "$system_drv_new"
|
|
||||||
' \
|
|
||||||
--quiet \
|
|
||||||
--return \
|
|
||||||
/dev/null
|
|
||||||
|
|
||||||
printf 'deploy? [N/y] ' >&2
|
|
||||||
read -r REPLY
|
|
||||||
if \test "$REPLY" != y; then
|
|
||||||
echo "$0: abort!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$0: --${opts.diff.long} has no effect because "$system_drv_cur" doesn't exist" >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
new_system=$(${pkgs.nix}/bin/nix-store --realize "$system_drv_new")
|
|
||||||
|
|
||||||
${pkgs.nix}/bin/nix-env -p "$system_profile" --set "$new_system"
|
|
||||||
PATH=${lib.makeBinPath [
|
|
||||||
pkgs.systemd
|
|
||||||
]} \
|
|
||||||
"$system_profile"/bin/switch-to-configuration switch
|
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/ln -fns "$system_drv_new" "$system_drv_cur"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use system's nixos-rebuild, which is not self-contained
|
# Use system's nixos-rebuild, which is not self-contained
|
||||||
export PATH=/run/current-system/sw/bin
|
export PATH=/run/current-system/sw/bin
|
||||||
exec ${utils.with-whatsupnix} \
|
exec ${utils.with-whatsupnix} \
|
||||||
|
@ -57,7 +57,7 @@ with import <stockholm/lib>;
|
|||||||
passAsFile = [ "text" ];
|
passAsFile = [ "text" ];
|
||||||
} /* sh */ ''
|
} /* sh */ ''
|
||||||
PATH=${makeBinPath (with pkgs; [
|
PATH=${makeBinPath (with pkgs; [
|
||||||
binutils
|
binutils-unwrapped
|
||||||
coreutils
|
coreutils
|
||||||
gcc
|
gcc
|
||||||
])}
|
])}
|
||||||
|
@ -13,11 +13,6 @@ with import <stockholm/lib>;
|
|||||||
|
|
||||||
http://www.exim.org/
|
http://www.exim.org/
|
||||||
|
|
||||||
{
|
|
||||||
url = https://api.github.com/repos/Gabriel439/nix-diff/git/refs/heads/master;
|
|
||||||
filter = "system:${pkgs.jq}/bin/jq -r .object.sha";
|
|
||||||
}
|
|
||||||
|
|
||||||
# ref src/nixpkgs/pkgs/tools/admin/sec/default.nix
|
# ref src/nixpkgs/pkgs/tools/admin/sec/default.nix
|
||||||
{
|
{
|
||||||
url = https://api.github.com/repos/simple-evcorr/sec/tags;
|
url = https://api.github.com/repos/simple-evcorr/sec/tags;
|
||||||
|
@ -11,6 +11,7 @@ in {
|
|||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.ff
|
pkgs.ff
|
||||||
|
pkgs.font-size
|
||||||
pkgs.gitAndTools.qgit
|
pkgs.gitAndTools.qgit
|
||||||
pkgs.mpv
|
pkgs.mpv
|
||||||
pkgs.sxiv
|
pkgs.sxiv
|
||||||
|
26
tv/5pkgs/simple/font-size.nix
Normal file
26
tv/5pkgs/simple/font-size.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ writeDashBin }:
|
||||||
|
writeDashBin "font-size" ''
|
||||||
|
set -efu
|
||||||
|
|
||||||
|
# set_font NORMAL_FONT BOLD_FONT
|
||||||
|
set_font() {
|
||||||
|
printf '\033]710;%s\007' "$1"
|
||||||
|
printf '\033]711;%s\007' "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
case ''${1-} in
|
||||||
|
'''|0|--reset)
|
||||||
|
set_font \
|
||||||
|
-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1 \
|
||||||
|
-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1 \
|
||||||
|
;;
|
||||||
|
[1-9]|[1-9][0-9]|[1-9][0-9][0-9])
|
||||||
|
set_font \
|
||||||
|
xft:Monospace:size=$1 \
|
||||||
|
xft:Monospace:size=$1:bold \
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$0: bad argument: $1" >&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
''
|
@ -133,6 +133,8 @@ myKeys conf = Map.fromList $
|
|||||||
[ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing)
|
[ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing)
|
||||||
, ((_4S , xK_c ), kill)
|
, ((_4S , xK_c ), kill)
|
||||||
|
|
||||||
|
, ((_4 , xK_p ), forkFile "${pkgs.pass}/bin/passmenu" ["--type"] Nothing)
|
||||||
|
|
||||||
, ((_4 , xK_x ), chooseAction spawnTermAt)
|
, ((_4 , xK_x ), chooseAction spawnTermAt)
|
||||||
, ((_4C , xK_x ), spawnRootTerm)
|
, ((_4C , xK_x ), spawnRootTerm)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user