2024-07-11 01:10:35 +09:00
|
|
|
{
|
|
|
|
description = "ego development environment";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/24.05";
|
|
|
|
};
|
|
|
|
|
2024-07-16 21:54:44 +09:00
|
|
|
outputs =
|
|
|
|
{ self, nixpkgs }:
|
2024-07-11 01:10:35 +09:00
|
|
|
let
|
|
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
|
|
|
in
|
|
|
|
{
|
2024-07-16 21:54:44 +09:00
|
|
|
devShells = forAllSystems (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default =
|
|
|
|
let
|
|
|
|
inherit (pkgs)
|
|
|
|
mkShell
|
|
|
|
buildGoModule
|
|
|
|
acl
|
|
|
|
xorg
|
|
|
|
;
|
|
|
|
in
|
|
|
|
mkShell {
|
|
|
|
packages = [
|
|
|
|
(buildGoModule rec {
|
|
|
|
pname = "ego";
|
|
|
|
version = "flake";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
vendorHash = null; # we have no dependencies :3
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X"
|
|
|
|
"main.Version=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
acl
|
|
|
|
xorg.libxcb
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
2024-07-11 01:10:35 +09:00
|
|
|
};
|
2024-07-16 21:54:44 +09:00
|
|
|
}
|
|
|
|
);
|
2024-07-11 01:10:35 +09:00
|
|
|
};
|
2024-07-16 21:54:44 +09:00
|
|
|
}
|