Commit ea3e1e0e authored by kyehn's avatar kyehn
Browse files
parent d1231866
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -25,15 +25,15 @@
  zlib,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "snapper";
  version = "0.12.2";
  version = "0.13.0";

  src = fetchFromGitHub {
    owner = "openSUSE";
    repo = "snapper";
    rev = "v${version}";
    sha256 = "sha256-SHwF9FMfrrf2IXrGjT/lTI8rDltVkRXkAQ9MpeNVeWw=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-8rIjfulMuh4HzZv08bX7gveJAo2X2GvswmBD3Ziu0NM=";
  };

  strictDeps = true;
@@ -62,18 +62,14 @@ stdenv.mkDerivation rec {
    zlib
  ];

  passthru.tests.snapper = nixosTests.snapper;

  postPatch = ''
  # Hard-coded root paths, hard-coded root paths everywhere...
    for file in {client,client/installation-helper,client/systemd-helper,data,pam,scripts,zypp-plugin}/Makefile.am; do
  postPatch = ''
    for file in {client/installation-helper,client/systemd-helper,data,scripts,zypp-plugin,scripts/completion}/Makefile.am; do
      substituteInPlace $file \
        --replace '$(DESTDIR)/usr' "$out" \
        --replace "DESTDIR" "out" \
        --replace "/usr" "$out"
        --replace-warn '$(DESTDIR)/usr' "$out" \
        --replace-warn "DESTDIR" "out" \
        --replace-warn "/usr" "$out"
    done
    substituteInPlace pam/Makefile.am \
      --replace '/`basename $(libdir)`' "$out/lib"
  '';

  configureFlags = [
@@ -92,10 +88,12 @@ stdenv.mkDerivation rec {
      $out/lib/systemd/system/* \
      $out/share/dbus-1/system-services/* \
    ; do
      substituteInPlace $file --replace "/usr" "$out"
      substituteInPlace $file --replace-warn "/usr" "$out"
    done
  '';

  passthru.tests.snapper = nixosTests.snapper;

  meta = {
    description = "Tool for Linux filesystem snapshot management";
    homepage = "http://snapper.io";
@@ -104,4 +102,4 @@ stdenv.mkDerivation rec {
    maintainers = with lib.maintainers; [ markuskowa ];
    platforms = lib.platforms.linux;
  };
}
})