gostart/flake.nix

56 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-07-27 08:11:49 -06:00
inputs.nixpkgs.url = "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-07-17 09:26:14 -06:00
gostart = pkgs.buildGo120Module {
pname = "gostart";
2023-07-28 06:13:56 -06:00
version = "v0.2.7";
2023-07-17 09:26:14 -06:00
src = ./.;
2022-11-29 19:55:00 -07:00
2023-07-28 06:13:56 -06:00
vendorHash = "sha256-gbyrsxO6sQQ3rJ4DkbuNn9xKLlfWIeeDrchHyvHARbM=";
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
echo "Go `${pkgs.go}/bin/go version`"
'';
nativeBuildInputs = with pkgs; [
elmPackages.elm
entr
git
go-tools
go_1_20
gopls
rlwrap
sqlc
sqlite
nodePackages.uglify-js
];
};
});
};
2022-11-29 19:55:00 -07:00
}