Merge staging-next into staging
This commit is contained in:
commit
5b8d5f23f8
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kdev-php";
|
||||
version = "5.6.0";
|
||||
version = "5.6.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
|
||||
sha256 = "1j5m9mhjzp2r4wdwnnnckms8ic536s6y0iyry2zdndbsy215hqlz";
|
||||
sha256 = "0xjijkmp3drnfrx4gb4bwf8n1dgwk310c0mssm6drffwix7ljpbz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kdev-python";
|
||||
version = "5.6.0";
|
||||
version = "5.6.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
|
||||
sha256 = "1bm6jk7gkl4vi579x99mja4znrzzp15zk66ss600dn8aq11jrxv2";
|
||||
sha256 = "1jma7j70imzxlyz8580m79jycif7zphga3zzfmqimn8syzz917hv";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -9,13 +9,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "moolticute";
|
||||
version = "0.44.17";
|
||||
version = "0.44.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mooltipass";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1bqp99n8cqr7kjiffbs39v0dd280f50hid5py3c4zgc7aqj9k0bx";
|
||||
sha256 = "1m3iy2v8mimyb25xisr7i4ga6qlggv1i2aji9qfgagns7ffp53nf";
|
||||
};
|
||||
|
||||
outputs = [ "out" "udev" ];
|
||||
|
@ -20,13 +20,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "ulauncher";
|
||||
version = "5.8.0";
|
||||
version = "5.8.1";
|
||||
|
||||
disabled = python3Packages.isPy27;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz";
|
||||
sha256 = "1czxzcxix9iwv1sir1q64j5aavc7lzjjwqpisgdc1kidkwnk05zp";
|
||||
sha256 = "1hgzfiwfk3dd50jmp184y754ydzmfv22qcv7z40gxj6pc67ahx3r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
|
@ -70,7 +70,6 @@ rpath = lib.makeLibraryPath [
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libxkbcommon
|
||||
libXrandr
|
||||
libXrender
|
||||
libXtst
|
||||
@ -89,11 +88,11 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "brave";
|
||||
version = "1.17.73";
|
||||
version = "1.18.70";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
|
||||
sha256 = "18bd6kgzfza5r0y2ggfy82pdpnfr2hzgjcfy9vxqq658z7q3jpqy";
|
||||
sha256 = "08v9r41knmvi3vi27hs8rsjiyrxiidx24zzwz2gbclf4l42sk88j";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
@ -25,7 +25,7 @@ let
|
||||
else "");
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "signal-desktop";
|
||||
version = "1.39.2"; # Please backport all updates to the stable channel.
|
||||
version = "1.39.3"; # Please backport all updates to the stable channel.
|
||||
# All releases have a limited lifetime and "expire" 90 days after the release.
|
||||
# When releases "expire" the application becomes unusable until an update is
|
||||
# applied. The expiration date for the current release can be extracted with:
|
||||
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "15lv8jpnn2cx7hmb7pn32cvq6nqvzjflf77bbnvxva5hf9zjkma9";
|
||||
sha256 = "1zrmxg7x5y48h9chiar798rbxrz8v79qa3lbkm0rxcjqfrnmr63x";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -3,12 +3,12 @@
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.8.8";
|
||||
version = "6.8.9";
|
||||
pname = "frostwire";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.amd64.tar.gz";
|
||||
sha256 = "0zxk0nv7m1k4n8n82h1rkh239a58s7j643lgqbw3qx45bdy4sf4k";
|
||||
sha256 = "0f5vyliwncryj6hj5xx0dycxycxddsn28n6zixjrn56jajijyl6q";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fossil";
|
||||
version = "2.12.1";
|
||||
version = "2.13";
|
||||
|
||||
src = fetchurl {
|
||||
urls =
|
||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
"https://www.fossil-scm.org/index.html/uv/fossil-src-${version}.tar.gz"
|
||||
];
|
||||
name = "${pname}-${version}.tar.gz";
|
||||
sha256 = "00v6gmn2wpfms5jzf103hkm5s8i3bfs5mzacmznlhdzdrzzjc8w2";
|
||||
sha256 = "1xbk7bb7340x2vvn22ykii54v721fwk8vgr3xvjkvv8ff7hd6cyr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles tcl ];
|
||||
|
22
pkgs/applications/window-managers/i3/i3-resurrect.nix
Normal file
22
pkgs/applications/window-managers/i3/i3-resurrect.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ lib, buildPythonApplication, click, i3ipc, psutil, natsort, fetchPypi, xprop, xdotool, importlib-metadata }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "i3-resurrect";
|
||||
version = "1.4.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0h181frdwpqfj9agw43qgicdvzv1i7xwky0vs0ksd8h18qxqp4hr";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ click psutil xprop natsort i3ipc xdotool importlib-metadata ];
|
||||
doCheck = false; # no tests
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/JonnyHaystack/i3-resurrect";
|
||||
description = "A simple but flexible solution to saving and restoring i3 workspaces";
|
||||
license = licenses.gpl3;
|
||||
platforms= platforms.linux;
|
||||
maintainers = with maintainers; [ magnetophon ];
|
||||
};
|
||||
}
|
@ -1196,4 +1196,4 @@ rec {
|
||||
`debDistros' sets. */
|
||||
diskImages = lib.mapAttrs (name: f: f {}) diskImageFuns;
|
||||
|
||||
} // import ./windows pkgs
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
{ stdenv, fetchurl, vmTools, writeScript, writeText, runCommand, makeInitrd
|
||||
, python, perl, coreutils, dosfstools, gzip, mtools, netcat-gnu, openssh, qemu
|
||||
, samba, socat, vde2, cdrkit, pathsFromGraph, gnugrep
|
||||
}:
|
||||
|
||||
{ isoFile, productKey, arch ? null }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
controller = import ./controller {
|
||||
inherit stdenv writeScript vmTools makeInitrd;
|
||||
inherit samba vde2 openssh socat netcat-gnu coreutils gzip gnugrep;
|
||||
};
|
||||
|
||||
mkCygwinImage = import ./cygwin-iso {
|
||||
inherit stdenv fetchurl runCommand python perl cdrkit pathsFromGraph;
|
||||
arch = let
|
||||
defaultArch = if stdenv.is64bit then "x86_64" else "i686";
|
||||
in if arch == null then defaultArch else arch;
|
||||
};
|
||||
|
||||
installer = import ./install {
|
||||
inherit controller mkCygwinImage;
|
||||
inherit stdenv runCommand openssh qemu writeText dosfstools mtools;
|
||||
};
|
||||
in rec {
|
||||
installedVM = installer {
|
||||
inherit isoFile productKey;
|
||||
};
|
||||
|
||||
runInVM = img: attrs: controller (attrs // {
|
||||
inherit (installedVM) sshKey;
|
||||
qemuArgs = attrs.qemuArgs or [] ++ [
|
||||
"-boot order=c"
|
||||
"-drive file=${img},index=0,media=disk"
|
||||
];
|
||||
});
|
||||
|
||||
runAndSuspend = let
|
||||
drives = {
|
||||
s = {
|
||||
source = "nixstore";
|
||||
target = "/nix/store";
|
||||
};
|
||||
x = {
|
||||
source = "xchg";
|
||||
target = "/tmp/xchg";
|
||||
};
|
||||
};
|
||||
|
||||
genDriveCmds = letter: { source, target }: [
|
||||
"net use ${letter}: '\\\\192.168.0.2\\${source}' /persistent:yes"
|
||||
"mkdir -p '${target}'"
|
||||
"mount -o bind '/cygdrive/${letter}' '${target}'"
|
||||
"echo '/cygdrive/${letter} ${target} none bind 0 0' >> /etc/fstab"
|
||||
];
|
||||
in runInVM "winvm.img" {
|
||||
command = concatStringsSep " && " ([
|
||||
"net config server /autodisconnect:-1"
|
||||
] ++ concatLists (mapAttrsToList genDriveCmds drives));
|
||||
suspendTo = "state.gz";
|
||||
};
|
||||
|
||||
suspendedVM = stdenv.mkDerivation {
|
||||
name = "cygwin-suspended-vm";
|
||||
buildCommand = ''
|
||||
${qemu}/bin/qemu-img create \
|
||||
-b "${installedVM}/disk.img" \
|
||||
-f qcow2 winvm.img
|
||||
${runAndSuspend}
|
||||
mkdir -p "$out"
|
||||
cp winvm.img "$out/disk.img"
|
||||
cp state.gz "$out/state.gz"
|
||||
'';
|
||||
};
|
||||
|
||||
resumeAndRun = command: runInVM "${suspendedVM}/disk.img" {
|
||||
resumeFrom = "${suspendedVM}/state.gz";
|
||||
qemuArgs = singleton "-snapshot";
|
||||
inherit command;
|
||||
};
|
||||
}
|
@ -1,263 +0,0 @@
|
||||
{ stdenv, writeScript, vmTools, makeInitrd
|
||||
, samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
|
||||
, runtimeShell
|
||||
}:
|
||||
|
||||
{ sshKey
|
||||
, qemuArgs ? []
|
||||
, command ? "sync"
|
||||
, suspendTo ? null
|
||||
, resumeFrom ? null
|
||||
, installMode ? false
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
preInitScript = writeScript "preinit.sh" ''
|
||||
#!${vmTools.initrdUtils}/bin/ash -e
|
||||
export PATH=${vmTools.initrdUtils}/bin
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
if [ "x''${arg#command=}" != "x$arg" ]; then
|
||||
command="''${arg#command=}"
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $(cat ${modulesClosure}/insmod-list); do
|
||||
insmod $i
|
||||
done
|
||||
|
||||
mkdir -p /dev /fs
|
||||
|
||||
mount -t tmpfs none /dev
|
||||
mknod /dev/null c 1 3
|
||||
mknod /dev/zero c 1 5
|
||||
mknod /dev/random c 1 8
|
||||
mknod /dev/urandom c 1 9
|
||||
mknod /dev/tty c 5 0
|
||||
|
||||
ifconfig lo up
|
||||
ifconfig eth0 up 192.168.0.2
|
||||
|
||||
mount -t tmpfs none /fs
|
||||
mkdir -p /fs/nix/store /fs/xchg /fs/dev /fs/sys /fs/proc /fs/etc /fs/tmp
|
||||
|
||||
mount -o bind /dev /fs/dev
|
||||
mount -t sysfs none /fs/sys
|
||||
mount -t proc none /fs/proc
|
||||
|
||||
mount -t 9p \
|
||||
-o trans=virtio,version=9p2000.L,cache=loose \
|
||||
store /fs/nix/store
|
||||
|
||||
mount -t 9p \
|
||||
-o trans=virtio,version=9p2000.L \
|
||||
xchg /fs/xchg
|
||||
|
||||
echo root:x:0:0::/root:/bin/false > /fs/etc/passwd
|
||||
|
||||
set +e
|
||||
chroot /fs $command $out
|
||||
echo $? > /fs/xchg/in-vm-exit
|
||||
|
||||
poweroff -f
|
||||
'';
|
||||
|
||||
initrd = makeInitrd {
|
||||
contents = singleton {
|
||||
object = preInitScript;
|
||||
symlink = "/init";
|
||||
};
|
||||
};
|
||||
|
||||
loopForever = "while :; do ${coreutils}/bin/sleep 1; done";
|
||||
|
||||
initScript = writeScript "init.sh" (''
|
||||
#!${runtimeShell}
|
||||
${coreutils}/bin/cp -L "${sshKey}" /ssh.key
|
||||
${coreutils}/bin/chmod 600 /ssh.key
|
||||
'' + (if installMode then ''
|
||||
echo -n "Waiting for Windows installation to finish..."
|
||||
while ! ${netcat-gnu}/bin/netcat -z 192.168.0.1 22; do
|
||||
echo -n .
|
||||
# Print a dot every 10 seconds only to shorten line length.
|
||||
${coreutils}/bin/sleep 10
|
||||
done
|
||||
${coreutils}/bin/touch /xchg/waiting_done
|
||||
echo " success."
|
||||
# Loop forever, because this VM is going to be killed.
|
||||
${loopForever}
|
||||
'' else ''
|
||||
${coreutils}/bin/mkdir -p /etc/samba /etc/samba/private \
|
||||
/var/lib/samba /var/log /var/run
|
||||
${coreutils}/bin/cat > /etc/samba/smb.conf <<CONFIG
|
||||
[global]
|
||||
security = user
|
||||
map to guest = Bad User
|
||||
guest account = root
|
||||
workgroup = cygwin
|
||||
netbios name = controller
|
||||
server string = %h
|
||||
log level = 1
|
||||
max log size = 1000
|
||||
log file = /var/log/samba.log
|
||||
|
||||
[nixstore]
|
||||
path = /nix/store
|
||||
writable = yes
|
||||
guest ok = yes
|
||||
|
||||
[xchg]
|
||||
path = /xchg
|
||||
writable = yes
|
||||
guest ok = yes
|
||||
CONFIG
|
||||
|
||||
${samba}/sbin/nmbd -D
|
||||
${samba}/sbin/smbd -D
|
||||
|
||||
echo -n "Waiting for Windows VM to become available..."
|
||||
while ! ${netcat-gnu}/bin/netcat -z 192.168.0.1 22; do
|
||||
echo -n .
|
||||
${coreutils}/bin/sleep 1
|
||||
done
|
||||
${coreutils}/bin/touch /xchg/waiting_done
|
||||
echo " success."
|
||||
|
||||
${openssh}/bin/ssh \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-i /ssh.key \
|
||||
-l Administrator \
|
||||
192.168.0.1 -- ${lib.escapeShellArg command}
|
||||
'') + optionalString (suspendTo != null) ''
|
||||
${coreutils}/bin/touch /xchg/suspend_now
|
||||
${loopForever}
|
||||
'');
|
||||
|
||||
kernelAppend = concatStringsSep " " [
|
||||
"panic=1"
|
||||
"loglevel=4"
|
||||
"console=tty1"
|
||||
"console=ttyS0"
|
||||
"command=${initScript}"
|
||||
];
|
||||
|
||||
controllerQemuArgs = concatStringsSep " " (maybeKvm64 ++ [
|
||||
"-pidfile $CTRLVM_PIDFILE"
|
||||
"-nographic"
|
||||
"-no-reboot"
|
||||
"-virtfs local,path=/nix/store,security_model=none,mount_tag=store"
|
||||
"-virtfs local,path=$XCHG_DIR,security_model=none,mount_tag=xchg"
|
||||
"-kernel ${modulesClosure.kernel}/bzImage"
|
||||
"-initrd ${initrd}/initrd"
|
||||
"-append \"${kernelAppend}\""
|
||||
"-net nic,vlan=0,macaddr=52:54:00:12:01:02,model=virtio"
|
||||
"-net vde,vlan=0,sock=$QEMU_VDE_SOCKET"
|
||||
]);
|
||||
|
||||
maybeKvm64 = optional (stdenv.hostPlatform.system == "x86_64-linux") "-cpu kvm64";
|
||||
|
||||
cygwinQemuArgs = concatStringsSep " " (maybeKvm64 ++ [
|
||||
"-monitor unix:$MONITOR_SOCKET,server,nowait"
|
||||
"-pidfile $WINVM_PIDFILE"
|
||||
"-nographic"
|
||||
"-net nic,vlan=0,macaddr=52:54:00:12:01:01"
|
||||
"-net vde,vlan=0,sock=$QEMU_VDE_SOCKET"
|
||||
"-rtc base=2010-01-01,clock=vm"
|
||||
] ++ qemuArgs ++ optionals (resumeFrom != null) [
|
||||
"-incoming 'exec: ${gzip}/bin/gzip -c -d \"${resumeFrom}\"'"
|
||||
]);
|
||||
|
||||
modulesClosure = overrideDerivation vmTools.modulesClosure (o: {
|
||||
rootModules = o.rootModules ++ singleton "virtio_net";
|
||||
});
|
||||
|
||||
preVM = ''
|
||||
(set; declare -p) > saved-env
|
||||
XCHG_DIR="$(${coreutils}/bin/mktemp -d nix-vm.XXXXXXXXXX --tmpdir)"
|
||||
${coreutils}/bin/mv saved-env "$XCHG_DIR/"
|
||||
|
||||
eval "$preVM"
|
||||
|
||||
QEMU_VDE_SOCKET="$(pwd)/vde.ctl"
|
||||
MONITOR_SOCKET="$(pwd)/monitor"
|
||||
WINVM_PIDFILE="$(pwd)/winvm.pid"
|
||||
CTRLVM_PIDFILE="$(pwd)/ctrlvm.pid"
|
||||
${vde2}/bin/vde_switch -s "$QEMU_VDE_SOCKET" --dirmode 0700 &
|
||||
echo 'alive?' | ${socat}/bin/socat - \
|
||||
UNIX-CONNECT:$QEMU_VDE_SOCKET/ctl,retry=20
|
||||
'';
|
||||
|
||||
vmExec = ''
|
||||
${vmTools.qemuProg} ${controllerQemuArgs} &
|
||||
${vmTools.qemuProg} ${cygwinQemuArgs} &
|
||||
echo -n "Waiting for VMs to start up..."
|
||||
timeout=60
|
||||
while ! test -e "$WINVM_PIDFILE" -a -e "$CTRLVM_PIDFILE"; do
|
||||
timeout=$(($timeout - 1))
|
||||
echo -n .
|
||||
if test $timeout -le 0; then
|
||||
echo " timed out."
|
||||
exit 1
|
||||
fi
|
||||
${coreutils}/bin/sleep 1
|
||||
done
|
||||
echo " done."
|
||||
'';
|
||||
|
||||
checkDropOut = ''
|
||||
if ! test -e "$XCHG_DIR/waiting_done" &&
|
||||
! kill -0 $(< "$WINVM_PIDFILE"); then
|
||||
echo "Windows VM has dropped out early, bailing out!" >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
toMonitor = "${socat}/bin/socat - UNIX-CONNECT:$MONITOR_SOCKET";
|
||||
|
||||
postVM = if suspendTo != null then ''
|
||||
while ! test -e "$XCHG_DIR/suspend_now"; do
|
||||
${checkDropOut}
|
||||
${coreutils}/bin/sleep 1
|
||||
done
|
||||
${toMonitor} <<CMD
|
||||
stop
|
||||
migrate_set_speed 4095m
|
||||
migrate "exec:${gzip}/bin/gzip -c > '${suspendTo}'"
|
||||
CMD
|
||||
echo -n "Waiting for memory dump to finish..."
|
||||
while ! echo info migrate | ${toMonitor} | \
|
||||
${gnugrep}/bin/grep -qi '^migration *status: *complete'; do
|
||||
${coreutils}/bin/sleep 1
|
||||
echo -n .
|
||||
done
|
||||
echo " done."
|
||||
echo quit | ${toMonitor}
|
||||
wait $(< "$WINVM_PIDFILE")
|
||||
eval "$postVM"
|
||||
exit 0
|
||||
'' else if installMode then ''
|
||||
wait $(< "$WINVM_PIDFILE")
|
||||
eval "$postVM"
|
||||
exit 0
|
||||
'' else ''
|
||||
while kill -0 $(< "$CTRLVM_PIDFILE"); do
|
||||
${checkDropOut}
|
||||
done
|
||||
if ! test -e "$XCHG_DIR/in-vm-exit"; then
|
||||
echo "Virtual machine didn't produce an exit code."
|
||||
exit 1
|
||||
fi
|
||||
eval "$postVM"
|
||||
exit $(< "$XCHG_DIR/in-vm-exit")
|
||||
'';
|
||||
|
||||
in writeScript "run-cygwin-vm.sh" ''
|
||||
#!${stdenv.shell} -e
|
||||
${preVM}
|
||||
${vmExec}
|
||||
${postVM}
|
||||
''
|
@ -1,56 +0,0 @@
|
||||
{ stdenv, fetchurl, runCommand, python, perl, xorriso, pathsFromGraph
|
||||
, arch ? "x86_64"
|
||||
}:
|
||||
|
||||
{ packages ? []
|
||||
, mirror ? "http://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwin"
|
||||
, extraContents ? []
|
||||
}:
|
||||
|
||||
let
|
||||
cygPkgList = if arch == "x86_64" then fetchurl {
|
||||
url = "${mirror}/x86_64/setup.ini";
|
||||
sha256 = "0arrxvxbl85l82iy648snx5cl952w791p45p0dfg1xpiaf96cbkj";
|
||||
} else fetchurl {
|
||||
url = "${mirror}/x86/setup.ini";
|
||||
sha256 = "1fayx34868vd5h2nah7chiw65sl3i9qzrwvs7lrlv2h8k412vb69";
|
||||
};
|
||||
|
||||
cygwinCross = (import ../../../../.. {
|
||||
localSystem = stdenv.hostPlatform;
|
||||
crossSystem = {
|
||||
libc = "msvcrt";
|
||||
platform = {};
|
||||
inherit arch;
|
||||
config = "${arch}-w64-mingw32";
|
||||
};
|
||||
}).windows.cygwinSetup;
|
||||
|
||||
makeCygwinClosure = { packages, packageList }: let
|
||||
expr = import (runCommand "cygwin.nix" { buildInputs = [ python ]; } ''
|
||||
python ${./mkclosure.py} "${packages}" ${toString packageList} > "$out"
|
||||
'');
|
||||
gen = { url, hash }: {
|
||||
source = fetchurl {
|
||||
url = "${mirror}/${url}";
|
||||
sha512 = hash;
|
||||
};
|
||||
target = url;
|
||||
};
|
||||
in map gen expr;
|
||||
|
||||
in import ../../../../../nixos/lib/make-iso9660-image.nix {
|
||||
inherit stdenv perl xorriso pathsFromGraph;
|
||||
syslinux = null;
|
||||
contents = [
|
||||
{ source = "${cygwinCross}/bin/setup.exe";
|
||||
target = "setup.exe";
|
||||
}
|
||||
{ source = cygPkgList;
|
||||
target = "setup.ini";
|
||||
}
|
||||
] ++ makeCygwinClosure {
|
||||
packages = cygPkgList;
|
||||
packageList = packages;
|
||||
} ++ extraContents;
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
# Ugliest Python code I've ever written. -- aszlig
|
||||
import sys
|
||||
|
||||
def get_plist(path):
|
||||
in_pack = False
|
||||
in_str = False
|
||||
current_key = None
|
||||
buf = ""
|
||||
packages = {}
|
||||
package_name = None
|
||||
package_attrs = {}
|
||||
with open(path, 'r') as setup:
|
||||
for line in setup:
|
||||
if in_str and line.rstrip().endswith('"'):
|
||||
package_attrs[current_key] = buf + line.rstrip()[:-1]
|
||||
in_str = False
|
||||
continue
|
||||
elif in_str:
|
||||
buf += line
|
||||
continue
|
||||
|
||||
if line.startswith('@'):
|
||||
in_pack = True
|
||||
package_name = line[1:].strip()
|
||||
package_attrs = {}
|
||||
elif in_pack and ':' in line:
|
||||
key, value = line.split(':', 1)
|
||||
if value.lstrip().startswith('"'):
|
||||
if value.lstrip()[1:].rstrip().endswith('"'):
|
||||
value = value.strip().strip('"')
|
||||
else:
|
||||
in_str = True
|
||||
current_key = key.strip().lower()
|
||||
buf = value.lstrip()[1:]
|
||||
continue
|
||||
package_attrs[key.strip().lower()] = value.strip()
|
||||
elif in_pack:
|
||||
in_pack = False
|
||||
packages[package_name] = package_attrs
|
||||
return packages
|
||||
|
||||
def main():
|
||||
packages = get_plist(sys.argv[1])
|
||||
to_include = set()
|
||||
|
||||
def traverse(package):
|
||||
to_include.add(package)
|
||||
attrs = packages.get(package, {})
|
||||
deps = attrs.get('requires', '').split()
|
||||
for new_dep in set(deps) - to_include:
|
||||
traverse(new_dep)
|
||||
|
||||
map(traverse, sys.argv[2:])
|
||||
|
||||
sys.stdout.write('[\n')
|
||||
for package, attrs in packages.iteritems():
|
||||
if package not in to_include:
|
||||
cats = [c.lower() for c in attrs.get('category', '').split()]
|
||||
if 'base' not in cats:
|
||||
continue
|
||||
|
||||
install_line = attrs.get('install')
|
||||
if install_line is None:
|
||||
continue
|
||||
|
||||
url, size, hash = install_line.split(' ', 2)
|
||||
|
||||
pack = [
|
||||
' {',
|
||||
' url = "{0}";'.format(url),
|
||||
' hash = "{0}";'.format(hash),
|
||||
' }',
|
||||
];
|
||||
sys.stdout.write('\n'.join(pack) + '\n')
|
||||
sys.stdout.write(']\n')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -1,44 +0,0 @@
|
||||
#note: the hardcoded /bin/sh is required for the VM's cygwin shell
|
||||
pkgs:
|
||||
|
||||
let
|
||||
bootstrapper = import ./bootstrap.nix {
|
||||
inherit (pkgs) stdenv vmTools writeScript writeText runCommand makeInitrd;
|
||||
inherit (pkgs) coreutils dosfstools gzip mtools netcat-gnu openssh qemu samba;
|
||||
inherit (pkgs) socat vde2 fetchurl python perl cdrkit pathsFromGraph;
|
||||
inherit (pkgs) gnugrep;
|
||||
};
|
||||
|
||||
builder = ''
|
||||
source /tmp/xchg/saved-env 2> /dev/null || true
|
||||
export NIX_STORE=/nix/store
|
||||
export NIX_BUILD_TOP=/tmp
|
||||
export TMPDIR=/tmp
|
||||
export PATH=/empty
|
||||
cd "$NIX_BUILD_TOP"
|
||||
exec $origBuilder $origArgs
|
||||
'';
|
||||
|
||||
in {
|
||||
runInWindowsVM = drv: pkgs.lib.overrideDerivation drv (attrs: let
|
||||
bootstrap = bootstrapper attrs.windowsImage;
|
||||
in {
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
builder = pkgs.stdenv.shell;
|
||||
args = ["-e" (bootstrap.resumeAndRun builder)];
|
||||
windowsImage = bootstrap.suspendedVM;
|
||||
origArgs = attrs.args;
|
||||
origBuilder = if attrs.builder == attrs.stdenv.shell
|
||||
then "/bin/sh"
|
||||
else attrs.builder;
|
||||
|
||||
postHook = ''
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
SHELL=/bin/sh
|
||||
eval "$origPostHook"
|
||||
'';
|
||||
|
||||
origPostHook = attrs.postHook or "";
|
||||
fixupPhase = ":";
|
||||
});
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
{ stdenv, runCommand, openssh, qemu, controller, mkCygwinImage
|
||||
, writeText, dosfstools, mtools
|
||||
}:
|
||||
|
||||
{ isoFile
|
||||
, productKey
|
||||
}:
|
||||
|
||||
let
|
||||
bootstrapAfterLogin = runCommand "bootstrap.sh" {} ''
|
||||
cat > "$out" <<EOF
|
||||
mkdir -p ~/.ssh
|
||||
cat > ~/.ssh/authorized_keys <<PUBKEY
|
||||
$(cat "${cygwinSshKey}/key.pub")
|
||||
PUBKEY
|
||||
ssh-host-config -y -c 'binmode ntsec' -w dummy
|
||||
cygrunsrv -S sshd
|
||||
shutdown -s 5
|
||||
EOF
|
||||
'';
|
||||
|
||||
cygwinSshKey = stdenv.mkDerivation {
|
||||
name = "snakeoil-ssh-cygwin";
|
||||
buildCommand = ''
|
||||
mkdir -p "$out"
|
||||
${openssh}/bin/ssh-keygen -t ecdsa -f "$out/key" -N ""
|
||||
'';
|
||||
};
|
||||
|
||||
sshKey = "${cygwinSshKey}/key";
|
||||
|
||||
packages = [ "openssh" "shutdown" ];
|
||||
|
||||
floppyCreator = import ./unattended-image.nix {
|
||||
inherit stdenv writeText dosfstools mtools;
|
||||
};
|
||||
|
||||
instfloppy = floppyCreator {
|
||||
cygwinPackages = packages;
|
||||
inherit productKey;
|
||||
};
|
||||
|
||||
cygiso = mkCygwinImage {
|
||||
inherit packages;
|
||||
extraContents = stdenv.lib.singleton {
|
||||
source = bootstrapAfterLogin;
|
||||
target = "bootstrap.sh";
|
||||
};
|
||||
};
|
||||
|
||||
installController = controller {
|
||||
inherit sshKey;
|
||||
installMode = true;
|
||||
qemuArgs = [
|
||||
"-boot order=c,once=d"
|
||||
"-drive file=${instfloppy},readonly,index=0,if=floppy"
|
||||
"-drive file=winvm.img,index=0,media=disk"
|
||||
"-drive file=${isoFile},index=1,media=cdrom"
|
||||
"-drive file=${cygiso}/iso/cd.iso,index=2,media=cdrom"
|
||||
];
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "cygwin-base-vm";
|
||||
buildCommand = ''
|
||||
${qemu}/bin/qemu-img create -f qcow2 winvm.img 2G
|
||||
${installController}
|
||||
mkdir -p "$out"
|
||||
cp winvm.img "$out/disk.img"
|
||||
'';
|
||||
passthru = {
|
||||
inherit sshKey;
|
||||
};
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
{ stdenv, writeText, dosfstools, mtools }:
|
||||
|
||||
{ productKey
|
||||
, shExecAfterwards ? "E:\\bootstrap.sh"
|
||||
, cygwinRoot ? "C:\\cygwin"
|
||||
, cygwinSetup ? "E:\\setup.exe"
|
||||
, cygwinRepository ? "E:\\"
|
||||
, cygwinPackages ? [ "openssh" ]
|
||||
}:
|
||||
|
||||
let
|
||||
afterSetup = [
|
||||
cygwinSetup
|
||||
"-L -n -q"
|
||||
"-l ${cygwinRepository}"
|
||||
"-R ${cygwinRoot}"
|
||||
"-C base"
|
||||
] ++ map (p: "-P ${p}") cygwinPackages;
|
||||
|
||||
winXpUnattended = writeText "winnt.sif" ''
|
||||
[Data]
|
||||
AutoPartition = 1
|
||||
AutomaticUpdates = 0
|
||||
MsDosInitiated = 0
|
||||
UnattendedInstall = Yes
|
||||
|
||||
[Unattended]
|
||||
DUDisable = Yes
|
||||
DriverSigningPolicy = Ignore
|
||||
Hibernation = No
|
||||
OemPreinstall = No
|
||||
OemSkipEula = Yes
|
||||
Repartition = Yes
|
||||
TargetPath = \WINDOWS
|
||||
UnattendMode = FullUnattended
|
||||
UnattendSwitch = Yes
|
||||
WaitForReboot = No
|
||||
|
||||
[GuiUnattended]
|
||||
AdminPassword = "nopasswd"
|
||||
AutoLogon = Yes
|
||||
AutoLogonCount = 1
|
||||
OEMSkipRegional = 1
|
||||
OemSkipWelcome = 1
|
||||
ServerWelcome = No
|
||||
TimeZone = 85
|
||||
|
||||
[UserData]
|
||||
ComputerName = "cygwin"
|
||||
FullName = "cygwin"
|
||||
OrgName = ""
|
||||
ProductKey = "${productKey}"
|
||||
|
||||
[Networking]
|
||||
InstallDefaultComponents = Yes
|
||||
|
||||
[Identification]
|
||||
JoinWorkgroup = cygwin
|
||||
|
||||
[NetAdapters]
|
||||
PrimaryAdapter = params.PrimaryAdapter
|
||||
|
||||
[params.PrimaryAdapter]
|
||||
InfID = *
|
||||
|
||||
[params.MS_MSClient]
|
||||
|
||||
[NetProtocols]
|
||||
MS_TCPIP = params.MS_TCPIP
|
||||
|
||||
[params.MS_TCPIP]
|
||||
AdapterSections=params.MS_TCPIP.PrimaryAdapter
|
||||
|
||||
[params.MS_TCPIP.PrimaryAdapter]
|
||||
DHCP = No
|
||||
IPAddress = 192.168.0.1
|
||||
SpecificTo = PrimaryAdapter
|
||||
SubnetMask = 255.255.255.0
|
||||
WINS = No
|
||||
|
||||
; Turn off all components
|
||||
[Components]
|
||||
${stdenv.lib.concatMapStrings (comp: "${comp} = Off\n") [
|
||||
"AccessOpt" "Appsrv_console" "Aspnet" "BitsServerExtensionsISAPI"
|
||||
"BitsServerExtensionsManager" "Calc" "Certsrv" "Certsrv_client"
|
||||
"Certsrv_server" "Charmap" "Chat" "Clipbook" "Cluster" "Complusnetwork"
|
||||
"Deskpaper" "Dialer" "Dtcnetwork" "Fax" "Fp_extensions" "Fp_vdir_deploy"
|
||||
"Freecell" "Hearts" "Hypertrm" "IEAccess" "IEHardenAdmin" "IEHardenUser"
|
||||
"Iis_asp" "Iis_common" "Iis_ftp" "Iis_inetmgr" "Iis_internetdataconnector"
|
||||
"Iis_nntp" "Iis_serversideincludes" "Iis_smtp" "Iis_webdav" "Iis_www"
|
||||
"Indexsrv_system" "Inetprint" "Licenseserver" "Media_clips" "Media_utopia"
|
||||
"Minesweeper" "Mousepoint" "Msmq_ADIntegrated" "Msmq_Core"
|
||||
"Msmq_HTTPSupport" "Msmq_LocalStorage" "Msmq_MQDSService"
|
||||
"Msmq_RoutingSupport" "Msmq_TriggersService" "Msnexplr" "Mswordpad"
|
||||
"Netcis" "Netoc" "OEAccess" "Objectpkg" "Paint" "Pinball" "Pop3Admin"
|
||||
"Pop3Service" "Pop3Srv" "Rec" "Reminst" "Rootautoupdate" "Rstorage" "SCW"
|
||||
"Sakit_web" "Solitaire" "Spider" "TSWebClient" "Templates"
|
||||
"TerminalServer" "UDDIAdmin" "UDDIDatabase" "UDDIWeb" "Vol" "WMAccess"
|
||||
"WMPOCM" "WbemMSI" "Wms" "Wms_admin_asp" "Wms_admin_mmc" "Wms_isapi"
|
||||
"Wms_server" "Zonegames"
|
||||
]}
|
||||
|
||||
[WindowsFirewall]
|
||||
Profiles = WindowsFirewall.TurnOffFirewall
|
||||
|
||||
[WindowsFirewall.TurnOffFirewall]
|
||||
Mode = 0
|
||||
|
||||
[SetupParams]
|
||||
UserExecute = "${stdenv.lib.concatStringsSep " " afterSetup}"
|
||||
|
||||
[GuiRunOnce]
|
||||
Command0 = "${cygwinRoot}\bin\bash -l ${shExecAfterwards}"
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "unattended-floppy.img";
|
||||
buildCommand = ''
|
||||
dd if=/dev/zero of="$out" count=1440 bs=1024
|
||||
${dosfstools}/sbin/mkfs.msdos "$out"
|
||||
${mtools}/bin/mcopy -i "$out" "${winXpUnattended}" ::winnt.sif
|
||||
'';
|
||||
}
|
@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libabigail";
|
||||
version = "1.7";
|
||||
version = "1.8";
|
||||
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://mirrors.kernel.org/sourceware/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0bf8w01l6wm7mm4clfg5rqi30m1ws11qqa4bp2vxghfwgi9ai8i7";
|
||||
sha256 = "0p363mkgypcklgf8iylxpbdnfgqc086a6fv7n9hzrjjci45jdgqw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libfprint";
|
||||
version = "1.90.4";
|
||||
version = "1.90.5";
|
||||
outputs = [ "out" "devdoc" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "libfprint";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0grhck0h29i7hm7npvby7pn7wdc446kv0r4mkpbssp46lqbjb96b";
|
||||
sha256 = "1wfwka2ik4hbb5wk5dp533040sqygwswg91c3v5fvpmmixh5qx9j";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
description = "A free package dependency solver";
|
||||
homepage = "https://github.com/openSUSE/libsolv";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
};
|
||||
}
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wxsqlite3";
|
||||
version = "4.6.1";
|
||||
version = "4.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "utelle";
|
||||
repo = "wxsqlite3";
|
||||
rev = "v${version}";
|
||||
sha256 = "0q5glzr49rjnpp6iqrx7zr9bz4n2ca0q0i0phk7y27rmxzrgpxk1";
|
||||
sha256 = "10jlb4p3ahck9apcy2c2mrrjynv4c1dfwwbf1vwd8dl17pgv4kgs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
52
pkgs/misc/emulators/reicast/default.nix
Normal file
52
pkgs/misc/emulators/reicast/default.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, curl
|
||||
, alsaLib
|
||||
, libGLU
|
||||
, libX11
|
||||
, libevdev
|
||||
, udev
|
||||
, libpulseaudio
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "reicast";
|
||||
version = "20.04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "reicast";
|
||||
repo = "reicast-emulator";
|
||||
rev = "r${version}";
|
||||
sha256 = "0vz3b1hg1qj6nycnqq5zcpzqpcbxw1c2ffamia5z3x7rapjx5d71";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
curl
|
||||
alsaLib
|
||||
libGLU
|
||||
libX11
|
||||
libevdev
|
||||
udev
|
||||
libpulseaudio
|
||||
];
|
||||
|
||||
# No rule to make target 'install'
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D ./reicast $out/bin/reicast
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://reicast.com/";
|
||||
description = "A multi-platform Sega Dreamcast emulator";
|
||||
license = with licenses; [ bsd3 gpl2Only lgpl2Only ];
|
||||
platforms = ["x86_64-linux" ];
|
||||
maintainers = [ maintainers.ivar ];
|
||||
};
|
||||
}
|
@ -1,19 +1,19 @@
|
||||
{ stdenv, fetchFromGitHub, autoreconfHook, libtool }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version="1.28";
|
||||
version="1.32";
|
||||
pname = "mxt-app";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "atmel-maxtouch";
|
||||
repo = "mxt-app";
|
||||
rev = "v${version}";
|
||||
sha256 = "1z2mir4ib9xzxmy0daazzvlga41n80zch1xyp1iz98rrdsnvd1la";
|
||||
sha256 = "1z1g5h14j3yw3r9phgir33s9j07ns9c0r5lkl49940pzqycnrwbj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [ libtool ];
|
||||
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -12,16 +12,16 @@
|
||||
# server, and the FHS userenv and corresponding NixOS module should
|
||||
# automatically pick up the changes.
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.21.0.3711-b509cc236";
|
||||
version = "1.21.1.3795-ee64ab56f";
|
||||
pname = "plexmediaserver";
|
||||
|
||||
# Fetch the source
|
||||
src = if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl {
|
||||
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb";
|
||||
sha256 = "0nhxxfcds3byhbz8gsd9107diy182m33xbcc8jgi78hwfadyjj7h";
|
||||
sha256 = "1k4ayb5jygi9g78703r1z4y4m0mp66m6jc72zj4zqk4xckzvjf4f";
|
||||
} else fetchurl {
|
||||
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";
|
||||
sha256 = "0izsmcc337paakz1nqfsr78s097sxyxy3kbs43qpzpx7w5wshynb";
|
||||
sha256 = "0qfc5k9sgi465pgrhv8nbm5p7s4wdpaljj54m2i7hfydva8ws8ci";
|
||||
};
|
||||
|
||||
outputs = [ "out" "basedb" ];
|
||||
|
@ -6,7 +6,7 @@ GEM
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
ffi (1.13.1)
|
||||
html-proofer (3.18.0)
|
||||
html-proofer (3.18.1)
|
||||
addressable (~> 2.3)
|
||||
mercenary (~> 0.3)
|
||||
nokogumbo (~> 2.0)
|
||||
|
@ -37,10 +37,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1icjr9hg8gk1dsy9gnhffkamh4d8yfkmqa4kfzdpbnvr50qvfmwz";
|
||||
sha256 = "0mp8vbnb58z97gscrbp0q0yn4wmq8gcr914kb8g6pjv5laq9hfxn";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.18.0";
|
||||
version = "3.18.1";
|
||||
};
|
||||
mercenary = {
|
||||
groups = ["default"];
|
||||
|
@ -6908,6 +6908,8 @@ in
|
||||
|
||||
rep = callPackage ../development/tools/rep { };
|
||||
|
||||
reicast = callPackage ../misc/emulators/reicast { };
|
||||
|
||||
reredirect = callPackage ../tools/misc/reredirect { };
|
||||
|
||||
retext = libsForQt5.callPackage ../applications/editors/retext { };
|
||||
@ -21994,6 +21996,8 @@ in
|
||||
|
||||
i3-layout-manager = callPackage ../applications/window-managers/i3/layout-manager.nix { };
|
||||
|
||||
i3-resurrect = python3Packages.callPackage ../applications/window-managers/i3/i3-resurrect.nix { };
|
||||
|
||||
i3blocks = callPackage ../applications/window-managers/i3/blocks.nix { };
|
||||
|
||||
i3blocks-gaps = callPackage ../applications/window-managers/i3/blocks-gaps.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user