mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
switch hto monorepo structure
This commit is contained in:
61
backend/flake.nix
Normal file
61
backend/flake.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
description = "DankMaterialShell Command Line Interface";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
forAllSystems =
|
||||
f:
|
||||
builtins.listToAttrs (
|
||||
map (system: {
|
||||
name = system;
|
||||
value = f system;
|
||||
}) supportedSystems
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = pkgs.lib;
|
||||
in
|
||||
{
|
||||
dms-cli = pkgs.buildGoModule (finalAttrs: {
|
||||
pname = "dms-cli";
|
||||
version = "0.4.3";
|
||||
src = ./.;
|
||||
vendorHash = "sha256-XbCg6qQwD4g4R/hBReLGE4NOq9uv0LBqogmfpBs//Ic=";
|
||||
|
||||
subPackages = [ "cmd/dms" ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.Version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "DankMaterialShell Command Line Interface";
|
||||
homepage = "https://github.com/AvengeMedia/DankMaterialShell/backend";
|
||||
mainProgram = "dms";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
});
|
||||
|
||||
default = self.packages.${system}.dms-cli;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user