diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-07-27 10:46:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 10:46:32 +0000 |
commit | 91894c29fab82ab258b508a6be500ba16b481b3d (patch) | |
tree | 0177247d47f233c80e625953f760f21321f2955f | |
parent | d0b7c6d8b6341400dc5db53fc13fd24a200c9f46 (diff) | |
parent | b1b7d127d0d6c2d57e3e39f759356fd3d51b2262 (diff) | |
download | nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar.gz nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar.bz2 nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar.lz nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar.xz nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.tar.zst nixlib-91894c29fab82ab258b508a6be500ba16b481b3d.zip |
Merge pull request #131663 from SuperSandro2000/cleanup
-rw-r--r-- | pkgs/applications/virtualization/8086tiny/builder.sh | 30 | ||||
-rw-r--r-- | pkgs/applications/virtualization/8086tiny/default.nix | 43 | ||||
-rw-r--r-- | pkgs/applications/virtualization/tiny8086/default.nix | 68 | ||||
-rw-r--r-- | pkgs/data/misc/xorg-rgb/default.nix | 20 | ||||
-rw-r--r-- | pkgs/servers/dict/wiktionary/builder.sh | 8 | ||||
-rw-r--r-- | pkgs/servers/dict/wiktionary/default.nix | 20 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
7 files changed, 95 insertions, 96 deletions
diff --git a/pkgs/applications/virtualization/8086tiny/builder.sh b/pkgs/applications/virtualization/8086tiny/builder.sh deleted file mode 100644 index 210f11e1328d..000000000000 --- a/pkgs/applications/virtualization/8086tiny/builder.sh +++ /dev/null @@ -1,30 +0,0 @@ - -source $stdenv/setup - -unpackPhase -cd $sourceRoot - -make 8086tiny - -if [ $bios ]; then - cd bios_source - nasm -f bin bios.asm -o bios - cd .. -fi - -mkdir -p $out/bin $out/share/$name $out/share/doc/$name/images - -install -m 755 8086tiny $out/bin -install -m 644 fd.img $out/share/$name/8086tiny-floppy.img -install -m 644 bios_source/bios.asm $out/share/$name/8086tiny-bios-src.asm -install -m 644 docs/8086tiny.css $out/share/doc/$name -install -m 644 docs/doc.html $out/share/doc/$name -for i in docs/images/*.gif -do - install -m 644 $i $out/share/doc/$name/images -done -if [ $bios ]; then - install -m 644 bios_source/bios $out/share/$name/8086tiny-bios -else - install -m 644 bios $out/share/$name/8086tiny-bios -fi diff --git a/pkgs/applications/virtualization/8086tiny/default.nix b/pkgs/applications/virtualization/8086tiny/default.nix deleted file mode 100644 index c58d488f5839..000000000000 --- a/pkgs/applications/virtualization/8086tiny/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib, stdenv, fetchFromGitHub -, localBios ? true, nasm ? null -, sdlSupport ? true, SDL ? null }: - -assert sdlSupport -> (SDL != null); - -stdenv.mkDerivation rec { - - pname = "8086tiny"; - version = "1.25"; - - src = fetchFromGitHub { - owner = "adriancable"; - repo = pname; - rev = "c79ca2a34d96931d55ef724c815b289d0767ae3a"; - sha256 = "00aydg8f28sgy8l3rd2a7jvp56lx3b63hhak43p7g7vjdikv495w"; - }; - - buildInputs = with lib; - optionals localBios [ nasm ] - ++ optionals sdlSupport [ SDL ]; - - bios = localBios; - - builder = ./builder.sh; - - meta = with lib; { - description = "An open-source small 8086 emulator"; - longDescription = '' - 8086tiny is a tiny, open-source (MIT), portable (little-endian hosts) - Intel PC emulator, powerful enough to run DOS, Windows 3.0, Excel, MS - Flight Simulator, AutoCAD, Lotus 1-2-3, and similar applications. 8086tiny - emulates a "late 80's era" PC XT-type machine. - - 8086tiny is based on an IOCCC 2013 winning entry. In fact that is the - "unobfuscated" version :) - ''; - homepage = "https://github.com/adriancable/8086tiny"; - license = licenses.mit; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/virtualization/tiny8086/default.nix b/pkgs/applications/virtualization/tiny8086/default.nix new file mode 100644 index 000000000000..60d69432cde6 --- /dev/null +++ b/pkgs/applications/virtualization/tiny8086/default.nix @@ -0,0 +1,68 @@ +{ lib +, stdenv +, fetchFromGitHub +, localBios ? true +, nasm +, sdlSupport ? true +, SDL +}: + +stdenv.mkDerivation rec { + pname = "8086tiny"; + version = "1.25"; + + src = fetchFromGitHub { + owner = "adriancable"; + repo = pname; + rev = "c79ca2a34d96931d55ef724c815b289d0767ae3a"; + sha256 = "00aydg8f28sgy8l3rd2a7jvp56lx3b63hhak43p7g7vjdikv495w"; + }; + + buildInputs = lib.optional localBios nasm + ++ lib.optional sdlSupport SDL; + + makeFlags = [ "8086tiny" ]; + + postBuild = lib.optionalString localBios '' + ( + cd bios_source + nasm -f bin bios.asm -o bios + ) + ''; + + installPhase = '' + mkdir -p $out/bin $out/share/8086tiny $out/share/doc/8086tiny/images + + install -m 755 8086tiny $out/bin + install -m 644 fd.img $out/share/8086tiny/8086tiny-floppy.img + install -m 644 bios_source/bios.asm $out/share/8086tiny/8086tiny-bios-src.asm + install -m 644 docs/8086tiny.css $out/share/doc/8086tiny + install -m 644 docs/doc.html $out/share/doc/$name + + for i in docs/images/\*.gif; do + install -m 644 $i $out/share/doc/8086tiny/images + done + + ${if localBios then + "install -m 644 bios_source/bios $out/share/8086tiny/8086tiny-bios" + else + "install -m 644 bios $out/share/8086tiny/8086tiny-bios"} + ''; + + meta = with lib; { + description = "An open-source small 8086 emulator"; + longDescription = '' + 8086tiny is a tiny, open-source (MIT), portable (little-endian hosts) + Intel PC emulator, powerful enough to run DOS, Windows 3.0, Excel, MS + Flight Simulator, AutoCAD, Lotus 1-2-3, and similar applications. 8086tiny + emulates a "late 80's era" PC XT-type machine. + + 8086tiny is based on an IOCCC 2013 winning entry. In fact that is the + "unobfuscated" version :) + ''; + homepage = "https://github.com/adriancable/8086tiny"; + license = licenses.mit; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/data/misc/xorg-rgb/default.nix b/pkgs/data/misc/xorg-rgb/default.nix index 056c56b4118e..205fcabc7131 100644 --- a/pkgs/data/misc/xorg-rgb/default.nix +++ b/pkgs/data/misc/xorg-rgb/default.nix @@ -1,20 +1,22 @@ -{lib, stdenv, fetchurl, pkg-config, xorgproto}: +{ lib, stdenv, fetchurl, pkg-config, xorgproto }: + stdenv.mkDerivation rec { pname = "rgb"; version = "1.0.6"; src = fetchurl { - url = "http://xorg.freedesktop.org/archive/individual/app/rgb-${version}.tar.bz2"; + url = "https://xorg.freedesktop.org/archive/individual/app/rgb-${version}.tar.bz2"; sha256 = "1c76zcjs39ljil6f6jpx1x17c8fnvwazz7zvl3vbjfcrlmm7rjmv"; }; - nativeBuildInputs = [pkg-config]; - buildInputs = [xorgproto]; - meta = { + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ xorgproto ]; + + meta = with lib; { description = "X11 colorname to RGB mapping database"; - license = lib.licenses.mit; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; - homepage = "http://xorg.freedesktop.org/"; + license = licenses.mit; + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; + homepage = "https://xorg.freedesktop.org/"; }; } diff --git a/pkgs/servers/dict/wiktionary/builder.sh b/pkgs/servers/dict/wiktionary/builder.sh deleted file mode 100644 index 65652ad4bdbf..000000000000 --- a/pkgs/servers/dict/wiktionary/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/share/dictd/ -cd $out/share/dictd - -python -O "$convert" "$src" -dictzip wiktionary-en.dict -echo en_US.UTF-8 > locale diff --git a/pkgs/servers/dict/wiktionary/default.nix b/pkgs/servers/dict/wiktionary/default.nix index 3a01120f3a68..05df86f3a784 100644 --- a/pkgs/servers/dict/wiktionary/default.nix +++ b/pkgs/servers/dict/wiktionary/default.nix @@ -1,23 +1,33 @@ { lib, stdenv, fetchurl, python2, dict, glibcLocales }: stdenv.mkDerivation rec { - version = "20210201"; pname = "dict-db-wiktionary"; + version = "20210201"; src = fetchurl { url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2"; sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs"; }; - convert = ./wiktionary2dict.py; - buildInputs = [ python2 dict glibcLocales ]; - builder = ./builder.sh; + # script in nixpkgs does not support python2 + nativeBuildInputs = [ python2 dict glibcLocales ]; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/share/dictd/ + cd $out/share/dictd + + ${python2.interpreter} -O ${./wiktionary2dict.py} "${src}" + dictzip wiktionary-en.dict + echo en_US.UTF-8 > locale + ''; passthru.updateScript = ./update.sh; meta = with lib; { description = "DICT version of English Wiktionary"; - homepage = "http://en.wiktionary.org/"; + homepage = "https://en.wiktionary.org/"; maintainers = with maintainers; [ qyliss ]; platforms = platforms.all; license = with licenses; [ cc-by-sa-30 fdl11Plus ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22403e10e2e3..4273685bf0bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9361,7 +9361,7 @@ in tinycbor = callPackage ../development/libraries/tinycbor { }; - tiny8086 = callPackage ../applications/virtualization/8086tiny { }; + tiny8086 = callPackage ../applications/virtualization/tiny8086 { }; tinyemu = callPackage ../applications/virtualization/tinyemu { }; |