commit
c5aa4ef300
@ -0,0 +1,66 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchzip |
||||
, autoPatchelfHook |
||||
, makeWrapper |
||||
, alsa-lib |
||||
, gtk-sharp-2_0 |
||||
, glib |
||||
, gtk2 |
||||
, mono |
||||
, openal |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "famistudio"; |
||||
version = "3.3.0"; |
||||
|
||||
src = fetchzip { |
||||
url = "https://github.com/BleuBleu/FamiStudio/releases/download/${version}/FamiStudio${lib.strings.concatStrings (lib.splitVersion version)}-LinuxAMD64.zip"; |
||||
stripRoot = false; |
||||
sha256 = "1r7y7z3s3b0zm7lvdgr9z70iall1swzlr3npx7g5azz6vza00vva"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; |
||||
|
||||
buildInputs = [ alsa-lib gtk-sharp-2_0 glib gtk2 mono openal ]; |
||||
|
||||
dontConfigure = true; |
||||
dontBuild = true; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
mkdir -p $out/{bin,lib/famistudio} |
||||
mv * $out/lib/famistudio |
||||
|
||||
makeWrapper ${mono}/bin/mono $out/bin/famistudio \ |
||||
--add-flags $out/lib/famistudio/FamiStudio.exe \ |
||||
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \ |
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ glib gtk2 gtk-sharp-2_0 ]} |
||||
|
||||
# Fails to find openal32.dll on its own, needs abit of help |
||||
rm $out/lib/famistudio/libopenal32.so |
||||
cat <<EOF >$out/lib/famistudio/OpenTK.dll.config |
||||
<configuration> |
||||
<dllmap dll="openal32.dll" target="${openal}/lib/libopenal.so"/> |
||||
</configuration> |
||||
EOF |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://famistudio.org/"; |
||||
description = "NES Music Editor"; |
||||
longDescription = '' |
||||
FamiStudio is very simple music editor for the Nintendo Entertainment System |
||||
or Famicom. It is targeted at both chiptune artists and NES homebrewers. |
||||
''; |
||||
license = licenses.mit; |
||||
# Maybe possible to build from source but I'm not too familiar with C# packaging |
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = [ "x86_64-linux" ]; |
||||
}; |
||||
} |
@ -0,0 +1,87 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, unstableGitUpdater |
||||
, pkg-config |
||||
, glfw |
||||
, libvgm |
||||
, libX11 |
||||
, libXau |
||||
, libXdmcp |
||||
, Carbon |
||||
, Cocoa |
||||
, cppunit |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "mmlgui"; |
||||
version = "unstable-2022-05-24"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "superctr"; |
||||
repo = "mmlgui"; |
||||
rev = "fe2b298c1eddae4cc38096f6c1ba1ccaed562cf1"; |
||||
fetchSubmodules = true; |
||||
sha256 = "Q34zzZthdThMbduXcc/qMome89mAMrn1Vinr073u4zo="; |
||||
}; |
||||
|
||||
postPatch = '' |
||||
# Actually wants pkgconf but that seems abit broken: |
||||
# https://github.com/NixOS/nixpkgs/pull/147503#issuecomment-1055943897 |
||||
# Removing a pkgconf-specific option makes it work with pkg-config |
||||
substituteInPlace libvgm.mak \ |
||||
--replace '--with-path=/usr/local/lib/pkgconfig' "" |
||||
substituteInPlace Makefile \ |
||||
--replace 'all: $(MMLGUI_BIN) test' 'all: $(MMLGUI_BIN)' |
||||
''; |
||||
|
||||
nativeBuildInputs = [ |
||||
pkg-config |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
glfw |
||||
libvgm |
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ |
||||
libX11 |
||||
libXau |
||||
libXdmcp |
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ |
||||
Carbon |
||||
Cocoa |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
cppunit |
||||
]; |
||||
|
||||
makeFlags = [ |
||||
"RELEASE=1" |
||||
]; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
doCheck = true; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
install -Dm755 {,$out/}bin/mmlgui |
||||
mkdir -p $out/share/ctrmml |
||||
mv ctrmml/sample $out/share/ctrmml/ |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
passthru.updateScript = unstableGitUpdater { |
||||
url = "https://github.com/superctr/mmlgui.git"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/superctr/mmlgui"; |
||||
description = "MML (Music Macro Language) editor and compiler GUI, powered by the ctrmml framework"; |
||||
license = licenses.gpl2Only; |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, unstableGitUpdater |
||||
, cmake |
||||
, pkg-config |
||||
, zlib |
||||
, libvgm |
||||
, inih |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "vgmplay-libvgm"; |
||||
version = "unstable-2022-03-17"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "ValleyBell"; |
||||
repo = "vgmplay-libvgm"; |
||||
rev = "a2c21cb134b58043a013ac2efc060144cdecf13d"; |
||||
sha256 = "0g251laqjvvzblyflkg8xac424dbxm1v35ckfazsfchmcqiaqfw4"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ]; |
||||
|
||||
buildInputs = [ zlib libvgm inih ]; |
||||
|
||||
postInstall = '' |
||||
install -Dm644 ../VGMPlay.ini $out/share/vgmplay/VGMPlay.ini |
||||
''; |
||||
|
||||
passthru.updateScript = unstableGitUpdater { |
||||
url = "https://github.com/ValleyBell/vgmplay-libvgm.git"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
mainProgram = "vgmplay"; |
||||
homepage = "https://github.com/ValleyBell/vgmplay-libvgm"; |
||||
description = "New VGMPlay, based on libvgm"; |
||||
license = licenses.unfree; # no licensing text anywhere yet |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@ |
||||
{ lib, buildGoModule, fetchFromGitHub }: |
||||
|
||||
buildGoModule rec { |
||||
pname = "swaynag-battery"; |
||||
version = "0.2.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "m00qek"; |
||||
repo = "swaynag-battery"; |
||||
rev = "v${version}"; |
||||
hash = "sha256-7f9+4Fzw5B5ATuud4MJC3iyuNRTx6kwJ7/KsusGtQM8="; |
||||
}; |
||||
|
||||
vendorSha256 = "h9Zj3zmQ0Xpili5Pl6CXh1L0bb2uL1//B79I4/ron08="; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/m00qek/swaynag-battery"; |
||||
description = "Shows a message when your battery is discharging "; |
||||
maintainers = with maintainers; [ asbachb ]; |
||||
license = licenses.mit; |
||||
}; |
||||
} |
@ -1,31 +0,0 @@ |
||||
{ lib, buildGoPackage, fetchFromGitHub }: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "git-lfs"; |
||||
version = "1.5.6"; |
||||
rev = "0d02fb7d9a1c599bbf8c55e146e2845a908e04e0"; |
||||
|
||||
goPackagePath = "github.com/git-lfs/git-lfs"; |
||||
|
||||
src = fetchFromGitHub { |
||||
inherit rev; |
||||
owner = "git-lfs"; |
||||
repo = "git-lfs"; |
||||
sha256 = "0wddry1lqjccf4522fvhx6grx8h57xsz17lkaf5aybnrgw677w3d"; |
||||
}; |
||||
|
||||
subPackages = [ "." ]; |
||||
|
||||
preBuild = '' |
||||
pushd go/src/github.com/git-lfs/git-lfs |
||||
go generate ./commands |
||||
popd |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Git extension for versioning large files"; |
||||
homepage = "https://git-lfs.github.com/"; |
||||
license = [ licenses.mit ]; |
||||
maintainers = [ maintainers.twey ]; |
||||
}; |
||||
} |
@ -1,9 +1,9 @@ |
||||
{ callPackage, Foundation, libobjc }: |
||||
{ callPackage, Foundation, libobjc, stdenv, lib }: |
||||
|
||||
callPackage ./generic.nix ({ |
||||
inherit Foundation libobjc; |
||||
version = "4.8.1.0"; |
||||
sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq"; |
||||
enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645 |
||||
extraPatches = [ ./mono4-glibc.patch ]; |
||||
extraPatches = lib.optionals stdenv.isLinux [ ./mono4-glibc.patch ]; |
||||
}) |
||||
|
@ -0,0 +1,122 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, unstableGitUpdater |
||||
, cmake |
||||
, libiconv |
||||
, zlib |
||||
, enableShared ? true |
||||
|
||||
, enableAudio ? true |
||||
, withWaveWrite ? true |
||||
, withWinMM ? stdenv.hostPlatform.isWindows |
||||
, withDirectSound ? stdenv.hostPlatform.isWindows |
||||
, withXAudio2 ? stdenv.hostPlatform.isWindows |
||||
, withWASAPI ? stdenv.hostPlatform.isWindows |
||||
, withOSS ? stdenv.hostPlatform.isFreeBSD |
||||
, withSADA ? stdenv.hostPlatform.isSunOS |
||||
, withALSA ? stdenv.hostPlatform.isLinux |
||||
, alsa-lib |
||||
, withPulseAudio ? stdenv.hostPlatform.isLinux |
||||
, libpulseaudio |
||||
, withCoreAudio ? stdenv.hostPlatform.isDarwin |
||||
, CoreAudio |
||||
, AudioToolbox |
||||
, withLibao ? true |
||||
, libao |
||||
|
||||
, enableEmulation ? true |
||||
, withAllEmulators ? true |
||||
, emulators ? [ ] |
||||
|
||||
, enableLibplayer ? true |
||||
|
||||
, enableTools ? false |
||||
}: |
||||
|
||||
assert enableTools -> enableAudio && enableEmulation && enableLibplayer; |
||||
|
||||
let |
||||
inherit (lib) optional optionals; |
||||
onOff = val: if val then "ON" else "OFF"; |
||||
in |
||||
stdenv.mkDerivation rec { |
||||
pname = "libvgm"; |
||||
version = "unstable-2022-05-27"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "ValleyBell"; |
||||
repo = "libvgm"; |
||||
rev = "ec6ddae3e3488b6dc9e993cb0f76d3015d2f6fff"; |
||||
sha256 = "AwIx4LuVSuCf7xgtximcB6N+rzC7g1ajeBdaBz6RSyk="; |
||||
}; |
||||
|
||||
outputs = [ |
||||
"out" |
||||
"dev" |
||||
] ++ optional enableTools "bin"; |
||||
|
||||
nativeBuildInputs = [ |
||||
cmake |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
libiconv |
||||
zlib |
||||
] ++ optionals withALSA [ |
||||
alsa-lib |
||||
] ++ optionals withPulseAudio [ |
||||
libpulseaudio |
||||
] ++ optionals withCoreAudio [ |
||||
CoreAudio |
||||
AudioToolbox |
||||
] ++ optionals withLibao [ |
||||
libao |
||||
]; |
||||
|
||||
cmakeFlags = [ |
||||
"-DBUILD_LIBAUDIO=${onOff enableAudio}" |
||||
"-DBUILD_LIBEMU=${onOff enableEmulation}" |
||||
"-DBUILD_LIBPLAYER=${onOff enableLibplayer}" |
||||
"-DBUILD_TESTS=${onOff enableTools}" |
||||
"-DBUILD_PLAYER=${onOff enableTools}" |
||||
"-DBUILD_VGM2WAV=${onOff enableTools}" |
||||
"-DLIBRARY_TYPE=${if enableShared then "SHARED" else "STATIC"}" |
||||
"-DUSE_SANITIZERS=ON" |
||||
] ++ optionals enableAudio [ |
||||
"-DAUDIODRV_WAVEWRITE=${onOff withWaveWrite}" |
||||
"-DAUDIODRV_WINMM=${onOff withWinMM}" |
||||
"-DAUDIODRV_DSOUND=${onOff withDirectSound}" |
||||
"-DAUDIODRV_XAUDIO2=${onOff withXAudio2}" |
||||
"-DAUDIODRV_WASAPI=${onOff withWASAPI}" |
||||
"-DAUDIODRV_OSS=${onOff withOSS}" |
||||
"-DAUDIODRV_SADA=${onOff withSADA}" |
||||
"-DAUDIODRV_ALSA=${onOff withALSA}" |
||||
"-DAUDIODRV_PULSE=${onOff withPulseAudio}" |
||||
"-DAUDIODRV_APPLE=${onOff withCoreAudio}" |
||||
"-DAUDIODRV_LIBAO=${onOff withLibao}" |
||||
] ++ optionals enableEmulation ([ |
||||
"-DSNDEMU__ALL=${onOff withAllEmulators}" |
||||
] ++ optionals (!withAllEmulators) |
||||
(lib.lists.forEach emulators (x: "-DSNDEMU_${x}=ON")) |
||||
) ++ optionals enableTools [ |
||||
"-DUTIL_CHARCNV_ICONV=ON" |
||||
"-DUTIL_CHARCNV_WINAPI=${onOff stdenv.hostPlatform.isWindows}" |
||||
]; |
||||
|
||||
passthru.updateScript = unstableGitUpdater { |
||||
url = "https://github.com/ValleyBell/libvgm.git"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/ValleyBell/libvgm"; |
||||
description = "More modular rewrite of most components from VGMPlay"; |
||||
license = |
||||
if (enableEmulation && (withAllEmulators || (lib.lists.any (core: core == "WSWAN_ALL") emulators))) then |
||||
licenses.unfree # https://github.com/ValleyBell/libvgm/issues/43 |
||||
else |
||||
licenses.gpl2Only; |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,17 @@ |
||||
diff --git a/setup.py b/setup.py
|
||||
index a976eee..6919795 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -64,12 +64,6 @@ class build_regexes(Command):
|
||||
|
||||
def run(self):
|
||||
work_path = self.work_path
|
||||
- if not os.path.exists(os.path.join(work_path, ".git")):
|
||||
- return
|
||||
-
|
||||
- log.info("initializing git submodules")
|
||||
- check_output(["git", "submodule", "init"], cwd=work_path)
|
||||
- check_output(["git", "submodule", "update"], cwd=work_path)
|
||||
|
||||
yaml_src = os.path.join(work_path, "uap-core", "regexes.yaml")
|
||||
if not os.path.exists(yaml_src):
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@ |
||||
{ stdenv |
||||
, runCommand |
||||
, makeBinaryWrapper |
||||
, binutils |
||||
, expectedArch ? stdenv.hostPlatform.parsed.cpu.name |
||||
}: |
||||
|
||||
runCommand "make-binary-wrapper-test-cross" { |
||||
nativeBuildInputs = [ |
||||
makeBinaryWrapper |
||||
binutils |
||||
]; |
||||
inherit expectedArch; |
||||
} '' |
||||
touch prog |
||||
chmod +x prog |
||||
makeWrapper prog $out |
||||
read -r _ arch < <($READELF --file-header $out | grep Machine:) |
||||
if [[ ''${arch,,} != *"''${expectedArch,,}"* ]]; then |
||||
echo "expected $expectedArch, got $arch" |
||||
exit 1 |
||||
fi |
||||
'' |
@ -0,0 +1,72 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, unstableGitUpdater |
||||
, dos2unix |
||||
, pkg-config |
||||
, zlib |
||||
, alsa-lib |
||||
, libjack2 |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "fmtoy"; |
||||
version = "unstable-2021-12-24"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "vampirefrog"; |
||||
repo = "fmtoy"; |
||||
rev = "0de6703b3373eb5bf19fd3deaae889286f330c21"; |
||||
sha256 = "0sr6klkmjd2hd2kyb9y0x986d6lsy8bziizfc6cmhkqcq92fh45c"; |
||||
}; |
||||
|
||||
postPatch = '' |
||||
dos2unix Makefile |
||||
# Don't hardcode compilers |
||||
sed -i -e '/CC=/d' -e '/CXX=/d' Makefile |
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin '' |
||||
# Remove Linux-only program & its dependencies |
||||
sed -i -e '/PROGS/ s/fmtoy_jack//' Makefile |
||||
substituteInPlace Makefile \ |
||||
--replace '$(shell pkg-config alsa jack --cflags)' "" |
||||
''; |
||||
|
||||
nativeBuildInputs = [ |
||||
dos2unix |
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ |
||||
pkg-config |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
zlib |
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ |
||||
alsa-lib |
||||
libjack2 |
||||
]; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
for prog in $(grep 'PROGS=' Makefile | cut -d= -f2-); do |
||||
install -Dm755 $prog $out/bin/$prog |
||||
done |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
passthru.updateScript = unstableGitUpdater { |
||||
url = "https://github.com/vampirefrog/fmtoy.git"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/vampirefrog/fmtoy"; |
||||
description = "Tools for FM voices for Yamaha YM chips (OPL, OPM and OPN series)"; |
||||
# Unknown license situation |
||||
# https://github.com/vampirefrog/fmtoy/issues/1 |
||||
license = licenses.unfree; |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,44 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, unstableGitUpdater |
||||
, cmake |
||||
, zlib |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "vgmtools"; |
||||
version = "unstable-2022-05-23"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "vgmrips"; |
||||
repo = "vgmtools"; |
||||
rev = "e0df1511ddf7b1207b448487616ff18a9049c278"; |
||||
sha256 = "2nM3E/XeZ1OeOj3fPqvuJgQcPOtBerduGpVfpGLVhHQ="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
cmake |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
zlib |
||||
]; |
||||
|
||||
# Some targets are not enabled by default |
||||
makeFlags = [ |
||||
"all" "opt_oki" "optdac" "optvgm32" |
||||
]; |
||||
|
||||
passthru.updateScript = unstableGitUpdater { |
||||
url = "https://github.com/vgmrips/vgmtools.git"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/vgmrips/vgmtools"; |
||||
description = "A collection of tools for the VGM file format"; |
||||
license = licenses.gpl2; # Not clarified whether Only or Plus |
||||
maintainers = with maintainers; [ OPNA2608 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,51 @@ |
||||
{ lib, stdenv, fetchFromGitHub, python3, zip }: let |
||||
version = "1.0.0"; |
||||
sha256 = "sha256-/o4er8bO/3HUFXzP+sC+5DYv9EwmxW05o1RT5fEulEg="; |
||||
|
||||
pname = "pridefetch"; |
||||
src = fetchFromGitHub { |
||||
owner = "SpyHoodle"; |
||||
repo = pname; |
||||
rev = "v" + version; |
||||
inherit sha256; |
||||
}; |
||||
in stdenv.mkDerivation { |
||||
inherit pname version src; |
||||
nativeBuildInputs = [ |
||||
zip |
||||
]; |
||||
buildInputs = [ |
||||
(python3.withPackages (pythonPackages: with pythonPackages; [ |
||||
distro |
||||
])) |
||||
]; |
||||
buildPhase = '' |
||||
runHook preBuild |
||||
pushd src |
||||
zip -r ../pridefetch.zip ./* |
||||
popd |
||||
echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch |
||||
rm pridefetch.zip |
||||
runHook postBuild |
||||
''; |
||||
installPhase = '' |
||||
runHook preInstall |
||||
mkdir -p $out/bin |
||||
mv pridefetch $out/bin/pridefetch |
||||
chmod +x $out/bin/pridefetch |
||||
runHook postInstall |
||||
''; |
||||
meta = with lib; { |
||||
description = "Print out system statistics with pride flags"; |
||||
longDescription = '' |
||||
Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag. |
||||
The flag which is printed is configurable, as well as the width of the output. |
||||
''; |
||||
homepage = "https://github.com/SpyHoodle/pridefetch"; |
||||
license = licenses.mit; |
||||
maintainers = [ |
||||
maintainers.minion3665 |
||||
]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,166 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchFromGitHub |
||||
, makeWrapper |
||||
# Required |
||||
, aircrack-ng |
||||
, bash |
||||
, coreutils-full |
||||
, gawk |
||||
, gnugrep |
||||
, gnused |
||||
, iproute2 |
||||
, iw |
||||
, pciutils |
||||
, procps |
||||
, tmux |
||||
# X11 Front |
||||
, xterm |
||||
, xorg |
||||
# what the author calls "Internals" |
||||
, usbutils |
||||
, wget |
||||
, ethtool |
||||
, util-linux |
||||
, ccze |
||||
# Optionals |
||||
# Missing in nixpkgs: beef, hostapd-wpe, asleap |
||||
, bettercap |
||||
, bully |
||||
, crunch |
||||
, dhcp |
||||
, dnsmasq |
||||
, ettercap |
||||
, hashcat |
||||
, hcxdumptool |
||||
, hcxtools |
||||
, hostapd |
||||
, john |
||||
, lighttpd |
||||
, mdk4 |
||||
, nftables |
||||
, openssl |
||||
, pixiewps |
||||
, reaverwps-t6x # Could be the upstream version too |
||||
, wireshark-cli |
||||
# Undocumented requirements (there is also ping) |
||||
, apparmor-bin-utils |
||||
, curl |
||||
, glibc |
||||
, ncurses |
||||
, networkmanager |
||||
, systemd |
||||
# Support groups |
||||
, supportWpaWps ? true # Most common use-case |
||||
, supportHashCracking ? false |
||||
, supportEvilTwin ? false |
||||
, supportX11 ? false # Allow using xterm instead of tmux, hard to test |
||||
}: |
||||
let |
||||
deps = [ |
||||
aircrack-ng |
||||
bash |
||||
coreutils-full |
||||
curl |
||||
gawk |
||||
glibc |
||||
gnugrep |
||||
gnused |
||||
iproute2 |
||||
iw |
||||
networkmanager |
||||
ncurses |
||||
pciutils |
||||
procps |
||||
tmux |
||||
usbutils |
||||
wget |
||||
ethtool |
||||
util-linux |
||||
ccze |
||||
systemd |
||||
] ++ lib.optionals supportWpaWps [ |
||||
bully |
||||
pixiewps |
||||
reaverwps-t6x |
||||
] ++ lib.optionals supportHashCracking [ |
||||
crunch |
||||
hashcat |
||||
hcxdumptool |
||||
hcxtools |
||||
john |
||||
wireshark-cli |
||||
] ++ lib.optionals supportEvilTwin [ |
||||
bettercap |
||||
dhcp |
||||
dnsmasq |
||||
ettercap |
||||
hostapd |
||||
lighttpd |
||||
openssl |
||||
mdk4 |
||||
nftables |
||||
apparmor-bin-utils |
||||
] ++ lib.optionals supportX11 [ |
||||
xterm |
||||
xorg.xset |
||||
xorg.xdpyinfo |
||||
]; |
||||
in |
||||
stdenv.mkDerivation rec { |
||||
pname = "airgeddon"; |
||||
version = "11.01"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "v1s1t0r1sh3r3"; |
||||
repo = "airgeddon"; |
||||
rev = "v${version}"; |
||||
sha256 = "3TjaLEcerRk69Ys4kj7vOMCRUd0ifFJzL4MB5ifoK68="; |
||||
}; |
||||
|
||||
strictDeps = true; |
||||
nativeBuildInputs = [ makeWrapper ]; |
||||
|
||||
# What these replacings do? |
||||
# - Disable the auto-updates (we'll run from a read-only directory); |
||||
# - Silence the checks (NixOS will enforce the PATH, it will only see the tools as we listed); |
||||
# - Use "tmux", we're not patching XTerm commands; |
||||
# - Remove PWD and $0 references, forcing it to use the paths from store; |
||||
# - Force our PATH to all tmux sessions. |
||||
postPatch = '' |
||||
patchShebangs airgeddon.sh |
||||
sed -i ' |
||||
s|AIRGEDDON_AUTO_UPDATE=true|AIRGEDDON_AUTO_UPDATE=false| |
||||
s|AIRGEDDON_SILENT_CHECKS=false|AIRGEDDON_SILENT_CHECKS=true| |
||||
s|AIRGEDDON_WINDOWS_HANDLING=xterm|AIRGEDDON_WINDOWS_HANDLING=tmux| |
||||
' .airgeddonrc |
||||
|
||||
sed -Ei ' |
||||
s|\$\(pwd\)|${placeholder "out"}/share/airgeddon;scriptfolder=${placeholder "out"}/share/airgeddon/| |
||||
s|\$\{0\}|${placeholder "out"}/bin/airgeddon| |
||||
s|tmux send-keys -t "([^"]+)" "|tmux send-keys -t "\1" "export PATH=\\"$PATH\\"; | |
||||
' airgeddon.sh |
||||
''; |
||||
|
||||
# ATTENTION: No need to chdir around, we're removing the occurrences of "$(pwd)" |
||||
postInstall = '' |
||||
wrapProgram $out/bin/airgeddon --prefix PATH : ${lib.makeBinPath deps} |
||||
''; |
||||
|
||||
# Install only the interesting files |
||||
installPhase = '' |
||||
runHook preInstall |
||||
install -Dm 755 airgeddon.sh "$out/bin/airgeddon" |
||||
install -dm 755 "$out/share/airgeddon" |
||||
cp -dr .airgeddonrc known_pins.db language_strings.sh plugins/ "$out/share/airgeddon/" |
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Multi-use TUI to audit wireless networks. "; |
||||
homepage = "https://github.com/v1s1t0r1sh3r3/airgeddon"; |
||||
license = licenses.gpl3Plus; |
||||
maintainers = with maintainers; [ pedrohlc ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
Loading…
Reference in new issue