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
24
pkgs/development/tools/haskell/dconf2nix/dconf2nix.nix
Normal file
24
pkgs/development/tools/haskell/dconf2nix/dconf2nix.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ mkDerivation, base, containers, fetchFromGitHub, hedgehog, lib
|
||||
, optparse-applicative, parsec, template-haskell, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "dconf2nix";
|
||||
version = "0.0.11";
|
||||
src = fetchFromGitHub {
|
||||
owner = "gvolpe";
|
||||
repo = "dconf2nix";
|
||||
rev = "fe7e3d973caa87b1b706096aff3d670f65e39fda";
|
||||
sha256 = "sha256-zuhiFVA8LvFKOPMMvqFu+ofv0CrIl2pMZbPQE/tCaM8=";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
base containers optparse-applicative parsec text
|
||||
];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
base containers hedgehog parsec template-haskell text
|
||||
];
|
||||
description = "Convert dconf files to Nix, as expected by Home Manager";
|
||||
license = lib.licenses.asl20;
|
||||
}
|
||||
32
pkgs/development/tools/haskell/dconf2nix/default.nix
Normal file
32
pkgs/development/tools/haskell/dconf2nix/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ haskell, haskellPackages, lib, runCommand }:
|
||||
|
||||
let
|
||||
dconf2nix =
|
||||
haskell.lib.compose.justStaticExecutables
|
||||
(haskell.lib.compose.overrideCabal (oldAttrs: {
|
||||
maintainers = (oldAttrs.maintainers or []) ++ [
|
||||
lib.maintainers.gvolpe
|
||||
];
|
||||
}) haskellPackages.dconf2nix);
|
||||
in
|
||||
|
||||
dconf2nix.overrideAttrs (oldAttrs: {
|
||||
passthru = (oldAttrs.passthru or {}) // {
|
||||
updateScript = ./update.sh;
|
||||
|
||||
# These tests can be run with the following command.
|
||||
#
|
||||
# $ nix-build -A dconf2nix.passthru.tests
|
||||
tests =
|
||||
runCommand
|
||||
"dconf2nix-tests"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
dconf2nix
|
||||
];
|
||||
}
|
||||
''
|
||||
dconf2nix > $out
|
||||
'';
|
||||
};
|
||||
})
|
||||
26
pkgs/development/tools/haskell/dconf2nix/update.sh
Executable file
26
pkgs/development/tools/haskell/dconf2nix/update.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix curl jq
|
||||
#
|
||||
# This script will update the dconf2nix derivation to the latest version using
|
||||
# cabal2nix.
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# dconf2nix derivation created with cabal2nix.
|
||||
dconf2nix_derivation_file="${script_dir}/dconf2nix.nix"
|
||||
|
||||
# This is the current revision of dconf2nix in Nixpkgs.
|
||||
old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$dconf2nix_derivation_file")"
|
||||
|
||||
# This is the latest release version of dconf2nix on GitHub.
|
||||
new_version=$(curl --silent "https://api.github.com/repos/gvolpe/dconf2nix/releases" | jq '.[0].tag_name' --raw-output)
|
||||
|
||||
echo "Updating dconf2nix from old version $old_version to new version $new_version."
|
||||
echo "Running cabal2nix and outputting to ${dconf2nix_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$new_version" "https://github.com/gvolpe/dconf2nix.git" > "$dconf2nix_derivation_file"
|
||||
|
||||
echo "Finished."
|
||||
Loading…
Add table
Add a link
Reference in a new issue