Skip to content

Commit

Permalink
btrfs-progs: build from source, not release tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
Atemu committed May 30, 2021
1 parent adf59f1 commit 50f367a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions pkgs/tools/filesystems/btrfs-progs/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, autoconf
, automake
, pkg-config
, attr
, acl
Expand All @@ -21,12 +23,16 @@ stdenv.mkDerivation rec {
pname = "btrfs-progs";
version = "5.12.1";

src = fetchurl {
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
sha256 = "sha256-lQhG/qRU+0scOfD6RUmDZEVy35HfXAYEezNb8tVHN1k=";
src = fetchFromGitHub {
owner = "kdave";
repo = pname;
rev = "v${version}";
sha256 = "sha256-rC9X4XzmT6PUDCajLkhuG85nRjJTqQ4mvevF4HWgHNE=";
};

nativeBuildInputs = [
autoconf
automake
pkg-config
asciidoc
xmlto
Expand All @@ -42,6 +48,11 @@ stdenv.mkDerivation rec {
# for python cross-compiling
_PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config;

preConfigure = ''
patchShebangs autogen.sh
sh autogen.sh
'';

postInstall = ''
install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs
'';
Expand Down

0 comments on commit 50f367a

Please sign in to comment.