add flake.nix

This commit is contained in:
SomeGuyNamedMy
2023-06-26 15:58:25 -04:00
parent 1d455a7e02
commit 14fb2d732b
2 changed files with 104 additions and 0 deletions

45
flake.nix Normal file
View File

@@ -0,0 +1,45 @@
{
description = "Native Gtk client for Lemmy";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
packages = rec {
lemoa = pkgs.rustPlatform.buildRustPackage {
pname = "lemoa";
version = "0.1.0";
src = ./.;
buildInputs = with pkgs; [
openssl
gtk4
libadwaita
];
nativeBuildInputs = with pkgs; [
openssl
pkg-config
gtk4
libadwaita
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"lemmy_api_common-0.18.0" = "sha256-l4UNO5Obx73nOiVnl6dc+sw2tekDLn2ixTs1GwqdE8I=";
};
};
meta = with pkgs.lib; {
description = "Native Gtk client for Lemmy";
homepage = "https://github.com/lemmygtk/lemoa";
license = with licenses; [
gpl3
];
};
};
default = lemoa;
};
});
}