From 182f0dfe5e24ab00e12b0af39722e25abb7ec737 Mon Sep 17 00:00:00 2001 From: Antono Vasiljev Date: Mon, 25 Jun 2012 17:25:01 +0300 Subject: [PATCH 1/2] Added bsod emulator for unix --- pkgs/misc/emulators/bsod/builder.sh | 8 ++++++++ pkgs/misc/emulators/bsod/default.nix | 28 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 pkgs/misc/emulators/bsod/builder.sh create mode 100644 pkgs/misc/emulators/bsod/default.nix diff --git a/pkgs/misc/emulators/bsod/builder.sh b/pkgs/misc/emulators/bsod/builder.sh new file mode 100644 index 000000000000..05637db67710 --- /dev/null +++ b/pkgs/misc/emulators/bsod/builder.sh @@ -0,0 +1,8 @@ +source $stdenv/setup + +tar xvfz $src +cd bsod-* +make +mkdir -p $out/bin +cp bsod $out/bin + diff --git a/pkgs/misc/emulators/bsod/default.nix b/pkgs/misc/emulators/bsod/default.nix new file mode 100644 index 000000000000..7dd1e31b36cc --- /dev/null +++ b/pkgs/misc/emulators/bsod/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, ncurses}: + +stdenv.mkDerivation { + name = "bsod-0.1"; + + builder = ./builder.sh; + + src = fetchurl { + url = http://www.vanheusden.com/bsod/bsod-0.1.tgz; + sha256 = "0hqwacazyq5rhc04j8w8w0j0dgb6ca8k66c9lxf6bsyi6wvbhvmd"; + }; + + buildInputs = [ ncurses ]; + + meta = { + description = "Blue Screen Of Death emulator for Unix"; + longDescription = " + This program will let you UNIX user experience the authentic + microsoft windows experience. Bsod displays the famous windows xp + blue screen of death on the console. Errors and drivers causing the + error are selected randomly from a large set of examples."; + homepage = "http://www.vanheusden.com/bsod/"; + license = "GPLv2"; + platforms = stdenv.lib.platforms.unix; + maintainers = [ stdenv.lib.maintainers.antono ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 64829164584d..e56c8465f476 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -437,6 +437,8 @@ let bootchart = callPackage ../tools/system/bootchart { }; + bsod = callPackage ../misc/emulators/bsod { }; + btrfsProgs = builderDefsPackage (import ../tools/filesystems/btrfsprogs) { inherit (pkgs) libuuid zlib acl attr fetchgit e2fsprogs; }; From 584ff70a169ec98c25b3aa62b16bc825c132bc6b Mon Sep 17 00:00:00 2001 From: Antono Vasiljev Date: Mon, 25 Jun 2012 18:04:08 +0300 Subject: [PATCH 2/2] Use installPhase instead of builder for BSOD --- pkgs/misc/emulators/bsod/builder.sh | 8 -------- pkgs/misc/emulators/bsod/default.nix | 7 +++++-- 2 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 pkgs/misc/emulators/bsod/builder.sh diff --git a/pkgs/misc/emulators/bsod/builder.sh b/pkgs/misc/emulators/bsod/builder.sh deleted file mode 100644 index 05637db67710..000000000000 --- a/pkgs/misc/emulators/bsod/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -source $stdenv/setup - -tar xvfz $src -cd bsod-* -make -mkdir -p $out/bin -cp bsod $out/bin - diff --git a/pkgs/misc/emulators/bsod/default.nix b/pkgs/misc/emulators/bsod/default.nix index 7dd1e31b36cc..181a89b66677 100644 --- a/pkgs/misc/emulators/bsod/default.nix +++ b/pkgs/misc/emulators/bsod/default.nix @@ -3,8 +3,6 @@ stdenv.mkDerivation { name = "bsod-0.1"; - builder = ./builder.sh; - src = fetchurl { url = http://www.vanheusden.com/bsod/bsod-0.1.tgz; sha256 = "0hqwacazyq5rhc04j8w8w0j0dgb6ca8k66c9lxf6bsyi6wvbhvmd"; @@ -12,6 +10,11 @@ stdenv.mkDerivation { buildInputs = [ ncurses ]; + installPhase = '' + ensureDir $out/bin + cp bsod $out/bin + ''; + meta = { description = "Blue Screen Of Death emulator for Unix"; longDescription = "