summary refs log tree commit diff
path: root/pkgs/applications/emulators
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-02-16 01:37:02 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-02-16 01:40:00 -0300
commit8ff85d5a9de5436009345523b0b9087282a2beb1 (patch)
tree8a95e6fcfc47d645fed41e3e77ef06ca9119ff72 /pkgs/applications/emulators
parentcecc4e406d748857bd64a51c43570d5360300f1d (diff)
downloadnixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar.gz
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar.bz2
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar.lz
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar.xz
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.tar.zst
nixpkgs-8ff85d5a9de5436009345523b0b9087282a2beb1.zip
tiny8086: refactor
Diffstat (limited to 'pkgs/applications/emulators')
-rw-r--r--pkgs/applications/emulators/tiny8086/default.nix24
1 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/applications/emulators/tiny8086/default.nix b/pkgs/applications/emulators/tiny8086/default.nix
index 60d69432cde..a0cc6bd7929 100644
--- a/pkgs/applications/emulators/tiny8086/default.nix
+++ b/pkgs/applications/emulators/tiny8086/default.nix
@@ -24,32 +24,33 @@ stdenv.mkDerivation rec {
   makeFlags = [ "8086tiny" ];
 
   postBuild = lib.optionalString localBios ''
-    (
-      cd bios_source
-      nasm -f bin bios.asm -o bios
-    )
+    pushd bios_source
+    nasm -f bin bios.asm -o bios
+    popd
   '';
 
   installPhase = ''
-    mkdir -p $out/bin $out/share/8086tiny $out/share/doc/8086tiny/images
+    runHook preInstall
 
+    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
+    for image in docs/images/\*.gif; do
+      install -m 644 $image $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"}
+    install -m 644 ${lib.optionalString localBios "bios_source/"}bios \
+      $out/share/8086tiny/8086tiny-bios
+
+    runHook postInstall
   '';
 
   meta = with lib; {
+    homepage = "https://github.com/adriancable/8086tiny";
     description = "An open-source small 8086 emulator";
     longDescription = ''
       8086tiny is a tiny, open-source (MIT), portable (little-endian hosts)
@@ -60,7 +61,6 @@ stdenv.mkDerivation rec {
       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;