uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
40
pkgs/os-specific/linux/ldm/default.nix
Normal file
40
pkgs/os-specific/linux/ldm/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchgit, udev, util-linux, mountPath ? "/media/" }:
|
||||
|
||||
assert mountPath != "";
|
||||
|
||||
let
|
||||
version = "0.5";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ldm";
|
||||
inherit version;
|
||||
|
||||
# There is a stable release, but we'll use the lvm branch, which
|
||||
# contains important fixes for LVM setups.
|
||||
src = fetchgit {
|
||||
url = "https://github.com/LemonBoy/ldm";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "0lxfypnbamfx6p9ar5k9wra20gvwn665l4pp2j4vsx4yi5q7rw2n";
|
||||
};
|
||||
|
||||
buildInputs = [ udev util-linux ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ldm.c \
|
||||
--replace "/mnt/" "${mountPath}"
|
||||
sed '16i#include <sys/stat.h>' -i ldm.c
|
||||
'';
|
||||
|
||||
buildFlags = [ "ldm" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -v ldm $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A lightweight device mounter, with libudev as only dependency";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue