xemu: cosmetic rewrite
- Use rec-less, overlay-style overridable attributes for stdenv.mkDerivation; - Reorder the lists and sets in asciibetical order; - Format the code.
This commit is contained in:
parent
73da635cdf
commit
9bff8435da
1 changed files with 48 additions and 45 deletions
|
@ -1,67 +1,67 @@
|
||||||
{ stdenv
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, lib
|
|
||||||
, makeDesktopItem
|
|
||||||
, copyDesktopItems
|
|
||||||
, pkg-config
|
|
||||||
, python3
|
|
||||||
, ninja
|
|
||||||
, meson
|
|
||||||
, which
|
|
||||||
, perl
|
|
||||||
, wrapGAppsHook
|
|
||||||
, glib
|
|
||||||
, gtk3
|
|
||||||
, libpcap
|
|
||||||
, openssl
|
|
||||||
, libepoxy
|
|
||||||
, libsamplerate
|
|
||||||
, SDL2
|
, SDL2
|
||||||
, SDL2_image
|
, SDL2_image
|
||||||
, mesa
|
, copyDesktopItems
|
||||||
, libdrm
|
|
||||||
, libGLU
|
|
||||||
, gettext
|
, gettext
|
||||||
|
, glib
|
||||||
|
, gtk3
|
||||||
|
, libGLU
|
||||||
|
, libdrm
|
||||||
|
, libepoxy
|
||||||
|
, libpcap
|
||||||
|
, libsamplerate
|
||||||
|
, makeDesktopItem
|
||||||
|
, mesa
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, openssl
|
||||||
|
, perl
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
, vte
|
, vte
|
||||||
|
, which
|
||||||
|
, wrapGAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (self: {
|
||||||
pname = "xemu";
|
pname = "xemu";
|
||||||
version = "0.7.84";
|
version = "0.7.84";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "xemu-project";
|
owner = "xemu-project";
|
||||||
repo = "xemu";
|
repo = "xemu";
|
||||||
rev = "v${version}";
|
rev = "v${self.version}";
|
||||||
fetchSubmodules = true;
|
|
||||||
hash = "sha256-pEXjwoQKbMmVNYCnh5nqP7k0acYOAp8SqxYZwPzVwDY=";
|
hash = "sha256-pEXjwoQKbMmVNYCnh5nqP7k0acYOAp8SqxYZwPzVwDY=";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
copyDesktopItems
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
python3.pkgs.pyyaml
|
python3.pkgs.pyyaml
|
||||||
ninja
|
|
||||||
which
|
which
|
||||||
meson
|
|
||||||
perl
|
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
copyDesktopItems
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib
|
|
||||||
gtk3
|
|
||||||
openssl
|
|
||||||
mesa
|
|
||||||
libepoxy
|
|
||||||
libdrm
|
|
||||||
libpcap
|
|
||||||
libsamplerate
|
|
||||||
SDL2
|
SDL2
|
||||||
libGLU
|
|
||||||
SDL2_image
|
SDL2_image
|
||||||
gettext
|
gettext
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
libGLU
|
||||||
|
libdrm
|
||||||
|
libepoxy
|
||||||
|
libpcap
|
||||||
|
libsamplerate
|
||||||
|
mesa
|
||||||
|
openssl
|
||||||
vte
|
vte
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -80,23 +80,26 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildFlags = [ "qemu-system-i386" ];
|
buildFlags = [ "qemu-system-i386" ];
|
||||||
|
|
||||||
desktopItems = [(makeDesktopItem {
|
desktopItems = [
|
||||||
name = "xemu";
|
(makeDesktopItem {
|
||||||
desktopName = "xemu";
|
name = "xemu";
|
||||||
exec = "xemu";
|
desktopName = "xemu";
|
||||||
icon = "xemu";
|
exec = "xemu";
|
||||||
})] ;
|
icon = "xemu";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
preConfigure = let
|
preConfigure = let
|
||||||
|
# When the data below can't be obtained through git, the build process tries
|
||||||
|
# to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
|
||||||
branch = "master";
|
branch = "master";
|
||||||
commit = "d8fa50e524c22f85ecb2e43108fd6a5501744351";
|
commit = "d8fa50e524c22f85ecb2e43108fd6a5501744351";
|
||||||
|
inherit (self) version;
|
||||||
in ''
|
in ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
|
configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
|
||||||
substituteInPlace ./scripts/xemu-version.sh \
|
substituteInPlace ./scripts/xemu-version.sh \
|
||||||
--replace 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'"
|
--replace 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'"
|
||||||
# If the versions can't be obtained through git, the build process tries
|
|
||||||
# to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
|
|
||||||
echo '${commit}' > XEMU_COMMIT
|
echo '${commit}' > XEMU_COMMIT
|
||||||
echo '${branch}' > XEMU_BRANCH
|
echo '${branch}' > XEMU_BRANCH
|
||||||
echo '${version}' > XEMU_VERSION
|
echo '${version}' > XEMU_VERSION
|
||||||
|
@ -128,4 +131,4 @@ stdenv.mkDerivation rec {
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue