Skip to content

Commit

Permalink
move more things to new pkgs system
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Apr 27, 2023
1 parent 93f5351 commit d9b1f22
Show file tree
Hide file tree
Showing 12 changed files with 263 additions and 299 deletions.
151 changes: 0 additions & 151 deletions mods/pkgs/cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,6 @@ let
shardsDerivation = shards: builtins.toFile "shards.nix" (lib.generators.toPretty { } shards);
in
{
s3-edit = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
pname = "s3-edit";
version = "0.0.16";

src = fetchFromGitHub {
owner = "tsub";
repo = "s3-edit";
rev = "v${version}";
sha256 = "sha256-BNFbg3IRsLOdakh8d53P0FSOGaGXYJuexECPlCMWCC0=";
};

ldflags = [
"-s"
"-w"
"-X cmd.version=${version}"
];

vendorHash = "sha256-ZM5Z3yLOwOYpOTyoXmSbyPFBE31F+Jvc6DN4rmHmyt0=";

meta = with lib; {
inherit (src.meta) homepage;
description = "Edit directly a file on Amazon S3 in CLI";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

memzoom = prev.callPackage
({ stdenv, lib }: stdenv.mkDerivation rec {
pname = "memzoom";
Expand Down Expand Up @@ -144,35 +113,6 @@ in
)
{ };

comcast = prev.callPackage
({ lib, buildGo119Module, fetchFromGitHub }:
buildGo119Module rec {
pname = "comcast";
version = "1.0.1";

# this is forked to fix go mod stuff
src = fetchFromGitHub {
owner = "jpetrucciani";
repo = "comcast";
rev = "93b2589b3e677c4f351c2ee7bf8709ce762ca697";
sha256 = "sha256-jfVxoKkZscemOdlyQNFXckhlEcl7UZ+MPoIQu2lcUaE=";
};

vendorHash = "sha256-AruaKBvPmHw13NTr0folQW1HouRVMW5M3gbFWT1tF/s=";

# disable checks because they need networking
doCheck = false;

meta = with lib; {
inherit (src.meta) homepage;
description = "Simulating shitty network connections so you can build better systems";
license = licenses.asl20;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

watcher = prev.callPackage
({ stdenv, clang13Stdenv, lib, fetchFromGitHub }:
let
Expand Down Expand Up @@ -206,46 +146,6 @@ in
})
{ };

tlsh-go = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
let
version = "0.3.0";
date = "2022-12-12";
in
buildGo120Module rec {
inherit version;
pname = "tlsh-go";

src = fetchFromGitHub {
owner = "glaslos";
repo = "tlsh";
rev = "v${version}";
sha256 = "sha256-fDFMF7ajhJ0veylJPoSxOtkkdwcRmR9G7MJgk5fnAdY=";
};

ldflags = [
"-s"
"-w"
"-X main.VERSION=${version}"
"-X main.BUILDDATE=${date}"
];

postInstall = ''
mv $out/bin/app $out/bin/tlsh
'';

vendorHash = null;

meta = with lib; {
inherit (src.meta) homepage;
description = "TLSH lib in Golang";
license = licenses.asl20;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

ov = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
Expand Down Expand Up @@ -372,57 +272,6 @@ in
)
{ };

lastresort = prev.callPackage
({ lib, fetchFromGitHub, rustPlatform }:
let
pname = "lastresort";
version = "0.4.0";
in
rustPlatform.buildRustPackage rec {
inherit pname version;

src = fetchFromGitHub {
owner = "ctsrc";
repo = "Base256";
rev = "v${version}";
sha256 = "sha256-wwwm7x42Fk7Hsf1rE+dKLQJGTkmZnbFGDl5OX3gJ1rU=";
};

cargoSha256 = "sha256-tt5B8jt3DSb7LWCCDWITpe9XD/EmFbGubUmlysFqRuM=";

meta = with lib; {
description = "Encode and decode data in base 256 easily typed words";
license = licenses.isc;
maintainers = with maintainers; [ jpetrucciani ];
};
})
{ };

terraform-cloud-exporter = prev.callPackage
({ lib, buildGo119Module, fetchFromGitHub }:
buildGo119Module rec {
pname = "terraform-cloud-exporter";
version = "2.3.0";

src = fetchFromGitHub {
owner = "pacoguzman";
repo = pname;
rev = "v${version}";
sha256 = "sha256-77ns9cBKr/d7gCZRdizuJm+adkk0WNeCVtKMZMLXmQA=";
};

vendorHash = "sha256-aw2Hv3utc/sIZC1E3RDsQcmT+FVIhTWkdU0+dB0/4ho=";

meta = with lib; {
inherit (src.meta) homepage;
description = "Prometheus exporter for Terraform Cloud metrics";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

buffalo = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
Expand Down
64 changes: 0 additions & 64 deletions mods/pkgs/cloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,68 +50,4 @@ with prev;
)
{ };

gofakes3 = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
pname = "gofakes3";
version = "0.0.0";

src = fetchFromGitHub {
owner = "johannesboyne";
repo = pname;
rev = "c0edf658332badad9eb3a69f44dbdcbfec487a68";
sha256 = "sha256-aToCIEkjfoQzG5+RyiLCK5IyEYyj3rJ9OoSm8lRMiVc=";
};

ldflags = [
"-s"
"-w"
];

vendorHash = "sha256-5Q2X0Wl/ltpP5SFr9TUbirISNL7IAyaDUkcESwqss/g=";

meta = with lib; {
description = "A simple fake AWS S3 object storage (used for local test-runs against AWS S3 APIs)";
homepage = "https://github.com/johannesboyne/gofakes3";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

goaws = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
pname = "goaws";
version = "0.4.1";

src = fetchFromGitHub {
owner = "Admiral-Piett";
repo = pname;
rev = "v${version}";
sha256 = "sha256-f0iEz/V/bnTxuXDo7X6yxQCBAhRyAEFzQoTC9ZB/9pM=";
};

vendorHash = "sha256-VqRRCQKtqhRtxG8uJrf332vXr1Lo0ivu8UNWf6y/K2s=";

ldflags = [
"-s"
"-w"
];

postInstall = ''
mv $out/bin/cmd $out/bin/goaws
'';

meta = with lib; {
description = "AWS (SQS/SNS) Clone for Development testing";
homepage = "https://github.com/Admiral-Piett/goaws";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

}
84 changes: 0 additions & 84 deletions mods/pkgs/server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,88 +18,4 @@ rec {
version = "2.6.5";
sha256 = "sha256-zp4Z6/zdQ+Ua+KYJDx341RLZct33QvpkimQ7uxkFZgU=";
};

poglets = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
pname = "poglets";
version = "0.0.3";
commit = "0e96c5f5887cd317cd92e6e51eb366929cee3ed1";

src = fetchFromGitHub {
owner = "jpetrucciani";
repo = pname;
rev = version;
sha256 = "sha256-owWLviFu/Y+365XZEw7vjmJMmz8wAYMkvGonVJDJ9rU=";
};

vendorHash = "sha256-Hjdv2Fvl1S52CDs4TAR3Yt9pEFUIvs5N5sVhZY+Edzo=";

nativeBuildInputs = [ installShellFiles ];

ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X main.GitCommit=${commit}"
];

postInstall = ''
installShellCompletion --cmd poglets \
--bash <($out/bin/poglets completion bash) \
--fish <($out/bin/poglets completion fish) \
--zsh <($out/bin/poglets completion zsh)
'';

meta = with lib; {
inherit (src.meta) homepage;
description = "";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

bigquery-emulator = prev.callPackage
({ lib, buildGo120Module, fetchFromGitHub, clangStdenv }:
(buildGo120Module.override { stdenv = clangStdenv; }) rec {
pname = "bigquery-emulator";
version = "0.2.12";
commit = "f21fa982972a8be6444c23459a88df58de7b14b4";

src = fetchFromGitHub {
owner = "goccy";
repo = pname;
rev = "v${version}";
sha256 = "sha256-mGR3s7OHuiMN1LqoWKRkJoXmZkqL7Ye9zJkDC4OFtus=";
};

vendorHash = "sha256-NJktyKDyByAWLAc/oayOSQxohKPcxAHiW2ynM77cCOY=";

CGO_ENABLED = 1;

nativeBuildInputs = [ ];
subPackages = [
"./cmd/bigquery-emulator"
];

ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.revision=${commit}"
"-linkmode external"
];

meta = with lib; {
inherit (src.meta) homepage;
description = "BigQuery emulator server implemented in Go";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
)
{ };

}
25 changes: 25 additions & 0 deletions pkgs/cli/comcast.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ lib, buildGo120Module, fetchFromGitHub }:
buildGo120Module rec {
pname = "comcast";
version = "1.0.1";

# this is forked to fix go mod stuff
src = fetchFromGitHub {
owner = "jpetrucciani";
repo = "comcast";
rev = "93b2589b3e677c4f351c2ee7bf8709ce762ca697";
hash = "sha256-jfVxoKkZscemOdlyQNFXckhlEcl7UZ+MPoIQu2lcUaE=";
};

vendorHash = "sha256-AruaKBvPmHw13NTr0folQW1HouRVMW5M3gbFWT1tF/s=";

# disable checks because they need networking
doCheck = false;

meta = with lib; {
inherit (src.meta) homepage;
description = "Simulating shitty network connections so you can build better systems";
license = licenses.asl20;
maintainers = with maintainers; [ jpetrucciani ];
};
}
23 changes: 23 additions & 0 deletions pkgs/cli/lastresort.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ lib, fetchFromGitHub, rustPlatform }:
let
pname = "lastresort";
version = "0.4.0";
in
rustPlatform.buildRustPackage rec {
inherit pname version;

src = fetchFromGitHub {
owner = "ctsrc";
repo = "Base256";
rev = "v${version}";
sha256 = "sha256-wwwm7x42Fk7Hsf1rE+dKLQJGTkmZnbFGDl5OX3gJ1rU=";
};

cargoSha256 = "sha256-tt5B8jt3DSb7LWCCDWITpe9XD/EmFbGubUmlysFqRuM=";

meta = with lib; {
description = "Encode and decode data in base 256 easily typed words";
license = licenses.isc;
maintainers = with maintainers; [ jpetrucciani ];
};
}
Loading

0 comments on commit d9b1f22

Please sign in to comment.