gostart/flake.nix

57 lines
1.4 KiB
Nix
Raw Normal View History

2022-11-29 19:55:00 -07:00
{
description = "gostart: a tailscale aware start page";
2023-09-20 09:27:00 -06:00
inputs.nixpkgs.url = "github:nixos/nixpkgs";
2022-11-29 19:55:00 -07:00
2023-07-17 09:26:14 -06:00
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 {
overlay = final: prev: {
gostart = self.packages.${prev.system}.gostart;
};
nixosModule = import ./module.nix;
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
2022-11-29 19:55:00 -07:00
in {
2023-09-20 09:37:07 -06:00
gostart = pkgs.buildGo121Module {
2023-07-17 09:26:14 -06:00
pname = "gostart";
2024-01-29 07:24:27 -07:00
version = "v0.2.12";
2023-07-17 09:26:14 -06:00
src = ./.;
2022-11-29 19:55:00 -07:00
2024-01-29 07:24:27 -07:00
vendorHash = "sha256-E6MaIzAVNz0zS5rtN1LdE32U54BJXNzt6s8p8efNryo=";
2023-07-17 09:26:14 -06:00
};
});
2022-11-29 19:55:00 -07:00
2023-07-17 09:26:14 -06:00
defaultPackage = forAllSystems (system: self.packages.${system}.gostart);
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook = ''
PS1='\u@\h:\@; '
nix run github:qbit/xin#flake-warn
2023-11-15 14:50:29 -07:00
echo "Go `${pkgs.go_1_21}/bin/go version`"
2023-07-17 09:26:14 -06:00
'';
nativeBuildInputs = with pkgs; [
elmPackages.elm
2023-11-15 14:50:29 -07:00
elmPackages.elm-json
2023-07-17 09:26:14 -06:00
entr
git
go-tools
2023-09-20 09:27:00 -06:00
go_1_21
2023-07-17 09:26:14 -06:00
gopls
rlwrap
sqlc
sqlite
nodePackages.uglify-js
];
};
});
};
2022-11-29 19:55:00 -07:00
}