46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{
|
|
description = "Unnamed Chat Server API";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
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.bashInteractive
|
|
pkgs.go
|
|
pkgs.delve
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|