oama: init at 0.14
This commit is contained in:
parent
533571da85
commit
62fa341dba
94
pkgs/by-name/oa/oama/generated-package.nix
Normal file
94
pkgs/by-name/oa/oama/generated-package.nix
Normal file
@ -0,0 +1,94 @@
|
||||
# This file has been autogenerate with cabal2nix.
|
||||
# Update via ./update.sh
|
||||
{
|
||||
mkDerivation,
|
||||
aeson,
|
||||
base,
|
||||
bytestring,
|
||||
containers,
|
||||
directory,
|
||||
fetchgit,
|
||||
hsyslog,
|
||||
http-conduit,
|
||||
lib,
|
||||
mtl,
|
||||
network,
|
||||
network-uri,
|
||||
optparse-applicative,
|
||||
pretty-simple,
|
||||
process,
|
||||
streaming-commons,
|
||||
string-qq,
|
||||
strings,
|
||||
text,
|
||||
time,
|
||||
twain,
|
||||
unix,
|
||||
utf8-string,
|
||||
warp,
|
||||
yaml,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "oama";
|
||||
version = "0.14";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/pdobsan/oama.git";
|
||||
sha256 = "1hdhkc6hh4nvx31vkaii7hd2rxlwqrsvr6i1i0a9r1xlda05ffq0";
|
||||
rev = "4e1ffd3001034771d284678f0160060c1871707c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson
|
||||
base
|
||||
bytestring
|
||||
containers
|
||||
directory
|
||||
hsyslog
|
||||
http-conduit
|
||||
mtl
|
||||
network
|
||||
network-uri
|
||||
optparse-applicative
|
||||
pretty-simple
|
||||
process
|
||||
streaming-commons
|
||||
string-qq
|
||||
strings
|
||||
text
|
||||
time
|
||||
twain
|
||||
unix
|
||||
utf8-string
|
||||
warp
|
||||
yaml
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson
|
||||
base
|
||||
bytestring
|
||||
containers
|
||||
directory
|
||||
hsyslog
|
||||
http-conduit
|
||||
mtl
|
||||
network
|
||||
network-uri
|
||||
optparse-applicative
|
||||
pretty-simple
|
||||
process
|
||||
streaming-commons
|
||||
string-qq
|
||||
strings
|
||||
text
|
||||
time
|
||||
twain
|
||||
unix
|
||||
utf8-string
|
||||
warp
|
||||
yaml
|
||||
];
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "oama";
|
||||
}
|
29
pkgs/by-name/oa/oama/package.nix
Normal file
29
pkgs/by-name/oa/oama/package.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
haskell,
|
||||
haskellPackages,
|
||||
lib,
|
||||
}:
|
||||
let
|
||||
inherit (haskell.lib.compose) overrideCabal justStaticExecutables;
|
||||
|
||||
overrides = {
|
||||
description = "OAuth credential MAnager";
|
||||
homepage = "https://github.com/pdobsan/oama";
|
||||
maintainers = with lib.maintainers; [ aidalgol ];
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
raw-pkg = (haskellPackages.callPackage ./generated-package.nix { }).overrideScope (
|
||||
final: prev: {
|
||||
# Dependency twain requires an older version of http2, and we cannot mix
|
||||
# versions of transitive dependencies.
|
||||
http2 = final.http2_3_0_3;
|
||||
warp = final.warp_3_3_30;
|
||||
}
|
||||
);
|
||||
in
|
||||
lib.pipe raw-pkg [
|
||||
(overrideCabal overrides)
|
||||
justStaticExecutables
|
||||
]
|
22
pkgs/by-name/oa/oama/update.sh
Executable file
22
pkgs/by-name/oa/oama/update.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix curl jq nixfmt-rfc-style
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
derivation_file="${script_dir}/generated-package.nix"
|
||||
latest_version="$(curl --silent https://api.github.com/repos/pdobsan/oama/releases/latest | jq --raw-output '.tag_name')"
|
||||
|
||||
echo "Updating oama to version ${latest_version}."
|
||||
echo "Running cabal2nix and outputting to ${derivation_file}..."
|
||||
|
||||
cat > "${derivation_file}" << EOF
|
||||
# This file has been autogenerate with cabal2nix.
|
||||
# Update via ./update.sh
|
||||
EOF
|
||||
|
||||
cabal2nix --revision "${latest_version}" https://github.com/pdobsan/oama.git >> "${derivation_file}"
|
||||
nixfmt "${derivation_file}"
|
||||
|
||||
echo "Finished."
|
Loading…
Reference in New Issue
Block a user