nixpkgs/pkgs/os-specific/linux/wpa_supplicant/gui.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

42 lines
1.0 KiB
Nix

{ lib, stdenv, mkDerivation, fetchpatch, qtbase, qmake, inkscape, imagemagick, wpa_supplicant }:
mkDerivation {
name = "wpa_gui-${wpa_supplicant.version}";
inherit (wpa_supplicant) src;
patches = [
# Fix build with Inkscape 1.0
# https://github.com/NixOS/nixpkgs/issues/86930
(fetchpatch {
url = "https://w1.fi/cgit/hostap/patch/?id=0388992905a5c2be5cba9497504eaea346474754";
sha256 = "05hs74qawa433adripzhycm45g7yvxr6074nd4zcl4gabzp9hd30";
})
];
buildInputs = [ qtbase ];
nativeBuildInputs = [ qmake inkscape imagemagick ];
postPatch = ''
cd wpa_supplicant/wpa_gui-qt4
'';
postBuild = ''
make -C icons
'';
postInstall = ''
mkdir -pv $out/{bin,share/applications,share/icons}
cp -v wpa_gui $out/bin
cp -v wpa_gui.desktop $out/share/applications
cp -av icons/hicolor $out/share/icons
'';
meta = with lib; {
description = "Qt-based GUI for wpa_supplicant";
homepage = "https://hostap.epitest.fi/wpa_supplicant/";
license = licenses.bsd3;
platforms = platforms.linux;
};
}