Merge pull request #335989 from aidalgol/oama

oama: init at 0.14
This commit is contained in:
Dennis Gosnell 2024-08-24 13:38:40 +09:00 committed by GitHub
commit 0e4fd9c60f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 146 additions and 7 deletions

View 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";
}

View 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
View 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."

View File

@ -926,6 +926,7 @@ mapAliases ({
ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10
MACS2 = macs2; # Added 2023-06-12
mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19
mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21
mariadb_104 = throw "mariadb_104 has been removed from nixpkgs, please switch to another version like mariadb_106"; # Added 2023-09-11
mariadb_1010 = throw "mariadb_1010 has been removed from nixpkgs, please switch to another version like mariadb_1011"; # Added 2023-11-14

View File

@ -2642,13 +2642,6 @@ with pkgs;
mainsail = callPackage ../applications/misc/mainsail { };
mailctl = (haskellPackages.callPackage ../tools/networking/mailctl {}).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;
});
mame = libsForQt5.callPackage ../applications/emulators/mame { };
mame-tools = lib.addMetaAttrs {