Unverified Commit a1c885a0 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

mmc-utils: unstable-2024-03-07 -> 1.0 (#421253)

parents a7388aef 6ce69de6
Loading
Loading
Loading
Loading
+15 −19
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchzip,
  unstableGitUpdater,
  fetchgit,
  gitUpdater,
  sparse,
}:

stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
  pname = "mmc-utils";
  version = "unstable-2024-03-07";
  version = "1.0";

  src = fetchzip rec {
    url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${passthru.rev}.tar.gz";
    passthru.rev = "e1281d4de9166b7254ba30bb58f9191fc2c9e7fb";
    sha256 = "/lkcZ/ArdBAStV9usavrbfjULXenqb+h2rbDJzxZjJk=";
  src = fetchgit {
    url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git";
    tag = "v${finalAttrs.version}";
    hash = "sha256-iWLA1psNPUBCPOP393/xnYJ6BEuOcPCEYgymqE06F3Q=";
  };

  nativeBuildInputs = [ sparse ];

  makeFlags = [
    "CC=${stdenv.cc.targetPrefix}cc"
    "prefix=$(out)"
    "mandir=$(out)/share/man"
  ];

  # causes redefinition of _FORTIFY_SOURCE
  hardeningDisable = [ "fortify3" ];

  postInstall = ''
    mkdir -p $out/share/man/man1
    cp man/mmc.1 $out/share/man/man1/
  '';

  enableParallelBuilding = true;

  passthru.updateScript = unstableGitUpdater {
    url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git";
  passthru.updateScript = gitUpdater {
    rev-prefix = "v";
  };

  meta = with lib; {
@@ -42,4 +38,4 @@ stdenv.mkDerivation {
    maintainers = [ maintainers.dezgeg ];
    platforms = platforms.linux;
  };
}
})