]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - default.nix
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / default.nix
index 82d4a8528deb474741955c07b5593c04bd8cb6cb..80aeb43314821924503d8a287892550224c96268 100644 (file)
@@ -1,45 +1,6 @@
-{ nixpkgs ? (import ./nix/nixpkgs.nix)
-}:
-
-with nixpkgs;
-
-stdenv.mkDerivation rec {
-  name = "bcachefs-tools-${version}";
-  version = "git";
-
-  src = lib.cleanSource ./.; # NOTE: ignore .git, otherwise things get weird!
-
-  nativeBuildInputs = [ git pkgconfig ];
-  buildInputs =
-    [ liburcu libuuid libaio zlib attr keyutils
-      libsodium libscrypt
-    ];
-
-  patchPhase = ''
-    # ensure the mkfs and fsck scripts, which are just wrappers around
-    # 'bcachefs', are patched to refer to the right location inside the
-    # nix store. (you wouldn't expect built tools to call random outside
-    # utilities, in general, but the exact tools they were built with.)
-    #
-    # TODO FIXME: it would be better to fix this in the 'install' target,
-    # however, so this works with any bog-standard installation
-
-    substituteInPlace fsck.bcachefs --replace bcachefs $out/bin/bcachefs
-    substituteInPlace mkfs.bcachefs --replace bcachefs $out/bin/bcachefs
-  '';
-
-  enableParallelBuilding = true;
-  makeFlags =
-    [ "PREFIX=$(out)"
-    ];
-
-  meta = with stdenv.lib; {
-    description = "Userspace tools for bcachefs";
-    homepage    = http://bcachefs.org;
-    license     = licenses.gpl2;
-    platforms   = platforms.linux;
-    maintainers =
-      [ "Kent Overstreet <kent.overstreet@gmail.com>"
-      ];
-  };
-}
+(import (let lock = builtins.fromJSON (builtins.readFile ./flake.lock);
+in fetchTarball {
+  url =
+    "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
+  sha256 = lock.nodes.flake-compat.locked.narHash;
+}) { src = ./.; }).defaultNix