Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codd: init at 0.1.6 #338660

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15761,6 +15761,12 @@
githubId = 110892040;
name = "Mykyta Polchanov";
};
mzabani = {
email = "mzabani@gmail.com";
github = "mzabani";
githubId = 4662691;
name = "Marcelo Zabani";
};
eclairevoyant marked this conversation as resolved.
Show resolved Hide resolved
mzacho = {
email = "nixpkgs@martinzacho.net";
github = "mzacho";
Expand Down
122 changes: 122 additions & 0 deletions pkgs/by-name/co/codd/generated.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
mkDerivation,
aeson,
aeson-pretty,
ansi-terminal,
attoparsec,
base,
bytestring,
clock,
containers,
criterion-measurement,
deepseq,
dlist,
filepath,
formatting,
hashable,
haxl,
hspec,
hspec-core,
hspec-expectations,
lib,
mtl,
network-uri,
optparse-applicative,
postgresql-libpq,
postgresql-simple,
QuickCheck,
random,
resourcet,
statistics,
streaming,
text,
time,
transformers,
typed-process,
unliftio,
unliftio-core,
unordered-containers,
uuid,
vector,
}:
mkDerivation {
pname = "codd";
version = "0.1.6";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson
aeson-pretty
ansi-terminal
attoparsec
base
bytestring
clock
containers
deepseq
dlist
filepath
formatting
hashable
haxl
mtl
network-uri
postgresql-libpq
postgresql-simple
resourcet
streaming
text
time
transformers
unliftio
unliftio-core
unordered-containers
vector
];
executableHaskellDepends = [
base
optparse-applicative
postgresql-simple
text
time
];
testHaskellDepends = [
aeson
attoparsec
base
containers
filepath
hashable
hspec
hspec-core
mtl
network-uri
postgresql-simple
QuickCheck
random
resourcet
streaming
text
time
typed-process
unliftio
uuid
];
benchmarkHaskellDepends = [
aeson
base
criterion-measurement
deepseq
hspec
hspec-core
hspec-expectations
statistics
streaming
text
vector
];
homepage = "https://github.com/mzabani/codd#readme";
license = lib.licenses.bsd3;
mainProgram = "codd";
}
53 changes: 53 additions & 0 deletions pkgs/by-name/co/codd/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
haskell,
haskellPackages,
}:

##############
# To upgrade codd you typically only need to change the version, revision and SHA hash
# in this very file.
# If codd's dependencies change, however, clone codd at https://github.com/mzabani/codd,
# checkout the desired tag and run `cabal2nix .` to produce and replace the generated.nix
# file. Finally, do change the version in this file.
##############

let
# Haxl has relatively tight version requirements and is thus often marked as broken.
haxlJailbroken = haskell.lib.markUnbroken (haskell.lib.doJailbreak haskellPackages.haxl);

generated = haskellPackages.callPackage ./generated.nix { haxl = haxlJailbroken; };

derivationWithVersion = haskell.lib.compose.overrideCabal (rec {
version = "0.1.6";
src = fetchFromGitHub {
owner = "mzabani";
repo = "codd";
rev = "refs/tags/v${version}";
hash = "sha256-KdZCL09TERy/PolQyYYykEbPtG5yhxrLZSSo9n6p2WE=";
};

# We only run codd's tests that don't require postgresql nor strace. We need to support unix sockets in codd's test suite
# before enabling postgresql's tests, and SystemResourcesSpecs might fail on macOS because of the need for strace and parsing
# libc calls. Not that we really gain much from running SystemResourcesSpecs here anyway.
testFlags = [
"--skip"
"/DbDependentSpecs/"
"--skip"
"/SystemResourcesSpecs/"
];

isLibrary = false;
testToolDepends = [ haskellPackages.hspec-discover ];

description = "CLI tool that applies postgres SQL migrations atomically with schema equality checks";

homepage = "https://github.com/mzabani/codd";

changelog = "https://github.com/mzabani/codd/releases/tag/v${version}";

maintainers = with lib.maintainers; [ mzabani ];
}) generated;
in
haskell.lib.compose.justStaticExecutables derivationWithVersion