gostart/flake.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

2022-11-29 19:55:00 -07:00
{
description = "gostart: a tailscale aware start page";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems =
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in {
packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in {
gostart = pkgs.buildGoModule {
pname = "gostart";
version = "v0.0.0";
src = ./.;
2022-12-04 19:03:59 -07:00
vendorSha256 =
"sha256-aW7Ysx6ovAskiNHlnmmK3VsgeO+VYJYjXitVCPfSS9k=";
2022-11-29 19:55:00 -07:00
proxyVendor = true;
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.gostart);
devShells = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook = ''
PS1='\u@\h:\@; '
echo "Go `${pkgs.go}/bin/go version`"
'';
2022-12-04 19:03:59 -07:00
nativeBuildInputs = with pkgs; [
git
go
gopls
go-tools
sqlc
sqlite
rlwrap
nodePackages.typescript
];
2022-11-29 19:55:00 -07:00
};
});
};
}