diff --git a/pkgs/os-specific/linux/upstart/check-config.nix b/pkgs/os-specific/linux/upstart/check-config.nix deleted file mode 100644 index 5803b4ed833..00000000000 --- a/pkgs/os-specific/linux/upstart/check-config.nix +++ /dev/null @@ -1,43 +0,0 @@ -# Useful tool to check syntax of a config file. Upstart needs a dbus -# session, so this script wraps one up and makes the operation not -# require any prior state. -# -# See: http://mwhiteley.com/scripts/2012/12/11/dbus-init-checkconf.html -{stdenv, coreutils, upstart, writeScript, dbus}: - -writeScript "upstart-check-config" '' - #!${stdenv.shell} - - set -o errexit - set -o nounset - - export PATH=${stdenv.lib.makeBinPath [dbus.out upstart coreutils]}:$PATH - - if [[ $# -ne 1 ]] - then - echo "Usage: $0 upstart-conf-file" >&2 - exit 1 - fi - config=$1 && shift - - dbus_pid_file=$(mktemp) - exec 4<> $dbus_pid_file - - dbus_add_file=$(mktemp) - exec 6<> $dbus_add_file - - dbus-daemon --fork --print-pid 4 --print-address 6 --session - - function clean { - dbus_pid=$(cat $dbus_pid_file) - if [[ -n $dbus_pid ]]; then - kill $dbus_pid - fi - rm -f $dbus_pid_file $dbus_add_file - } - trap "{ clean; }" EXIT - - export DBUS_SESSION_BUS_ADDRESS=$(cat $dbus_add_file) - - init-checkconf $config -'' diff --git a/pkgs/os-specific/linux/upstart/default.nix b/pkgs/os-specific/linux/upstart/default.nix deleted file mode 100644 index 76ce2637ced..00000000000 --- a/pkgs/os-specific/linux/upstart/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, dbus, libnih, python, makeWrapper, utillinux -, writeScript }: - -let - inherit (stdenv.lib) makeBinPath; - version = "1.5"; - - upstart = stdenv.mkDerivation rec { - name = "upstart-${version}"; - - src = fetchurl { - url = "http://upstart.ubuntu.com/download/${version}/${name}.tar.gz"; - sha256 = "01w4ab6nlisz5blb0an1sxjkndwikr7sjp0cmz4lg00g3n7gahmx"; - }; - - buildInputs = [ pkgconfig dbus libnih python makeWrapper]; - - NIX_CFLAGS_COMPILE = - '' - -DSHELL="${stdenv.shell}" - -DCONFFILE="/etc/init.conf" - -DCONFDIR="/etc/init" - -DPATH="/no-path" - ''; - - # The interface version prevents NixOS from switching to an - # incompatible Upstart at runtime. (Switching across reboots is - # fine, of course.) It should be increased whenever Upstart changes - # in a backwards-incompatible way. If the interface version of two - # Upstart builds is the same, then we can switch between them at - # runtime; otherwise we can't and we need to reboot. - passthru.interfaceVersion = 2; - - postInstall = - '' - t=$out/etc/bash_completion.d - mkdir -p $t - cp ${./upstart-bash-completion} $t/upstart - - # Patch some binaries to refer to the correct binary location. - sed -i "s,/sbin/init,$out/bin/init,g" $out/bin/init-checkconf - sed -i "s,initctl,$out/bin/initctl," $out/bin/initctl2dot - - # Add some missing executable permissions, and wrap binaries. - chmod +x $out/bin/init-checkconf $out/bin/init-checkconf - wrapProgram $out/bin/init-checkconf \ - --prefix PATH : $out/bin:${makeBinPath [utillinux dbus]} - wrapProgram $out/bin/initctl2dot --prefix PATH : $out/bin - ''; - - meta = { - homepage = http://upstart.ubuntu.com/; - description = "An event-based replacement for the /sbin/init daemon"; - platforms = stdenv.lib.platforms.linux; - }; -}; - -in upstart diff --git a/pkgs/os-specific/linux/upstart/upstart-bash-completion b/pkgs/os-specific/linux/upstart/upstart-bash-completion deleted file mode 100644 index f47d38c90ad..00000000000 --- a/pkgs/os-specific/linux/upstart/upstart-bash-completion +++ /dev/null @@ -1,18 +0,0 @@ -_upstart_comp_list(){ - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $(compgen -o filenames -W "$@" $cur) ) - fi -} - -_upstart_complete() { _upstart_comp_list "$(initctl list 2>&1 | grep -E "$1" | cut -f2 -d ' ')"; } - -_waiting(){ _upstart_complete "(waiting|instance)"; } -_running(){ _upstart_complete "(running|instance)"; } -_jobs(){ _upstart_comp_list "$(ls -1 /etc/event.d 2> /dev/null)"; } - -complete -F _jobs status -complete -F _waiting start -complete -F _running stop -complete -F _running restart diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2691a4f85d3..8fb97035794 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12754,10 +12754,6 @@ with pkgs; upower = callPackage ../os-specific/linux/upower { }; - upstart = callPackage ../os-specific/linux/upstart { }; - - upstart-check-config = callPackage ../os-specific/linux/upstart/check-config.nix {}; - usbguard = libsForQt5.callPackage ../os-specific/linux/usbguard { libgcrypt = null; }; diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 40218a2b702..be055ccb285 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -159,7 +159,6 @@ with import ./release-lib.nix { inherit supportedSystems; }; udev = linux; unar = linux; unzip = all; - upstart = linux; usbutils = linux; utillinux = linux; utillinuxMinimal = linux;