1{ lib, stdenv, fetchzip, unstableGitUpdater }:
2
3stdenv.mkDerivation {
4 pname = "mmc-utils";
5 version = "unstable-2024-03-07";
6
7 src = fetchzip rec {
8 url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${passthru.rev}.tar.gz";
9 passthru.rev = "e1281d4de9166b7254ba30bb58f9191fc2c9e7fb";
10 sha256 = "/lkcZ/ArdBAStV9usavrbfjULXenqb+h2rbDJzxZjJk=";
11 };
12
13 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "prefix=$(out)" ];
14
15 # causes redefinition of _FORTIFY_SOURCE
16 hardeningDisable = [ "fortify3" ];
17
18 postInstall = ''
19 mkdir -p $out/share/man/man1
20 cp man/mmc.1 $out/share/man/man1/
21 '';
22
23 enableParallelBuilding = true;
24
25 passthru.updateScript = unstableGitUpdater {
26 url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git";
27 };
28
29 meta = with lib; {
30 description = "Configure MMC storage devices from userspace";
31 mainProgram = "mmc";
32 homepage = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/";
33 license = licenses.gpl2Only;
34 maintainers = [ maintainers.dezgeg ];
35 platforms = platforms.linux;
36 };
37}