2024-05-05 13:30:29 -06:00
|
|
|
{
|
|
|
|
description = "widdler: A WebDAV server for TiddlyWikis ";
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
overlay = _: prev: { inherit (self.packages.${prev.system}) widdler; };
|
|
|
|
|
|
|
|
packages = forAllSystems (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgsFor.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
widdler = pkgs.buildGo122Module {
|
|
|
|
pname = "widdler";
|
|
|
|
version = "v1.2.4";
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
vendorHash = "sha256-gZmJSA91lo1UScNt7Hy5buZq5utsvomR21SubFX889k=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.widdler);
|
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgsFor.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
shellHook = ''
|
|
|
|
PS1='\u@\h:\@; '
|
|
|
|
nix flake run github:qbit/xin#flake-warn
|
|
|
|
echo "Go `${pkgs.go}/bin/go version`"
|
|
|
|
'';
|
2024-05-05 13:40:33 -06:00
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
git
|
|
|
|
go
|
|
|
|
gopls
|
|
|
|
goreleaser
|
2024-05-05 13:48:19 -06:00
|
|
|
gosec
|
2024-05-05 13:40:33 -06:00
|
|
|
go-tools
|
|
|
|
nilaway
|
|
|
|
];
|
2024-05-05 13:30:29 -06:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|