initial commit
This commit is contained in:
42
flake.nix
Normal file
42
flake.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
description = "Unnamed Chat Server API";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
||||
version = builtins.substring 0 8 lastModifiedDate;
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.buildGoModule {
|
||||
pname = "chat-api-server";
|
||||
inherit version;
|
||||
src = ./.;
|
||||
vendorHash = null;
|
||||
};
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
hardeningDisable = [ "fortify" ];
|
||||
buildInputs = [
|
||||
pkgs.go
|
||||
pkgs.delve
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user