mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-26 14:53:52 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, pgweb
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "pgweb";
|
|
version = "0.16.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sosedoff";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-gZK8+H3dBMzSVyE96E7byihKMR4+1YlVFZJtCTGUZwI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Disable tests require network access.
|
|
rm -f pkg/client/{client,dump}_test.go
|
|
'';
|
|
|
|
vendorHash = "sha256-Jpvf6cST3kBvYzCQLoJ1fijUC/hP1ouptd2bQZ1J/Lo=";
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
# There is a `/tmp/foo` file on the test machine causing the test case to fail on macOS
|
|
"TestParseOptions"
|
|
];
|
|
in
|
|
[ "-skip" "${builtins.concatStringsSep "|" skippedTests}" ];
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
version = "v${version}";
|
|
package = pgweb;
|
|
command = "pgweb --version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/sosedoff/pgweb/releases/tag/v${version}";
|
|
description = "Web-based database browser for PostgreSQL";
|
|
longDescription = ''
|
|
A simple postgres browser that runs as a web server. You can view data,
|
|
run queries and examine tables and indexes.
|
|
'';
|
|
homepage = "https://sosedoff.github.io/pgweb/";
|
|
license = licenses.mit;
|
|
mainProgram = "pgweb";
|
|
maintainers = with maintainers; [ zupo luisnquin ];
|
|
};
|
|
}
|