about summary refs log tree commit diff
path: root/pkgs/by-name/xe
diff options
context:
space:
mode:
authorAnderson Torres2024-05-15 20:35:47 -0300
committerAnderson Torres2024-05-15 20:35:47 -0300
commit87b380dbfb4b69737a6bfb66bf46b0b153f0b0e2 (patch)
tree2b01ebedacb19b261fd94c45b9da6d812356c39e /pkgs/by-name/xe
parent68fcc9061fa2e7a9045777f19c044b22235e6726 (diff)
xemu: nixfmt
Diffstat (limited to 'pkgs/by-name/xe')
-rw-r--r--pkgs/by-name/xe/xemu/package.nix135
1 files changed, 75 insertions, 60 deletions
diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix
index e8d2f665f919..54b44a1997ec 100644
--- a/pkgs/by-name/xe/xemu/package.nix
+++ b/pkgs/by-name/xe/xemu/package.nix
@@ -1,29 +1,30 @@
-{ lib
-, SDL2
-, SDL2_image
-, copyDesktopItems
-, fetchFromGitHub
-, gettext
-, glib
-, gtk3
-, libGLU
-, libdrm
-, libepoxy
-, libpcap
-, libsamplerate
-, libslirp
-, makeDesktopItem
-, mesa
-, meson
-, ninja
-, openssl
-, perl
-, pkg-config
-, python3Packages
-, stdenv
-, vte
-, which
-, wrapGAppsHook3
+{
+  lib,
+  SDL2,
+  SDL2_image,
+  copyDesktopItems,
+  fetchFromGitHub,
+  gettext,
+  glib,
+  gtk3,
+  libGLU,
+  libdrm,
+  libepoxy,
+  libpcap,
+  libsamplerate,
+  libslirp,
+  makeDesktopItem,
+  mesa,
+  meson,
+  ninja,
+  openssl,
+  perl,
+  pkg-config,
+  python3Packages,
+  stdenv,
+  vte,
+  which,
+  wrapGAppsHook3,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -38,18 +39,20 @@ stdenv.mkDerivation (finalAttrs: {
     hash = "sha256-VcztVzG/IN9N0SVKj6BipyqnhxXC2nTTuMjKMtFKzGw=";
   };
 
-  nativeBuildInputs = [
-    copyDesktopItems
-    meson
-    ninja
-    perl
-    pkg-config
-    which
-    wrapGAppsHook3
-  ] ++ (with python3Packages; [
-    python
-    pyyaml
-  ]);
+  nativeBuildInputs =
+    [
+      copyDesktopItems
+      meson
+      ninja
+      perl
+      pkg-config
+      which
+      wrapGAppsHook3
+    ]
+    ++ (with python3Packages; [
+      python
+      pyyaml
+    ]);
 
   buildInputs = [
     SDL2
@@ -98,35 +101,47 @@ stdenv.mkDerivation (finalAttrs: {
       --replace 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'"
   '';
 
-  preConfigure = ''
-    configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
-  '' +
-  # When the data below can't be obtained through git, the build process tries
-  # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
-  ''
-    echo '${finalAttrs.version}' > XEMU_VERSION
-  '';
+  preConfigure =
+    ''
+      configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
+    ''
+    +
+      # When the data below can't be obtained through git, the build process tries
+      # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
+      ''
+        echo '${finalAttrs.version}' > XEMU_VERSION
+      '';
 
   preBuild = ''
     cd build
     substituteInPlace ./build.ninja --replace /usr/bin/env $(which env)
   '';
 
-  installPhase = let
-    installIcon = resolution: ''
-      install -Dm644 -T ../ui/icons/xemu_${resolution}.png \
-        $out/share/icons/hicolor/${resolution}/apps/xemu.png
+  installPhase =
+    let
+      installIcon = resolution: ''
+        install -Dm644 -T ../ui/icons/xemu_${resolution}.png \
+          $out/share/icons/hicolor/${resolution}/apps/xemu.png
+      '';
+    in
+    ''
+      runHook preInstall
+
+      install -Dm755 -T qemu-system-i386 $out/bin/xemu
+    ''
+    + (lib.concatMapStringsSep "\n" installIcon [
+      "16x16"
+      "24x24"
+      "32x32"
+      "48x48"
+      "128x128"
+      "256x256"
+      "512x512"
+    ])
+    + "\n"
+    + ''
+      runHook postInstall
     '';
-  in ''
-    runHook preInstall
-
-    install -Dm755 -T qemu-system-i386 $out/bin/xemu
-  '' +
-  (lib.concatMapStringsSep "\n" installIcon
-    [ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) + "\n" +
-  ''
-    runHook postInstall
-  '';
 
   meta = {
     homepage = "https://xemu.app/";