Skip to content

Commit

Permalink
Add nix support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mifom committed Nov 3, 2022
1 parent e71aa55 commit fa7a0ca
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
result*
76 changes: 76 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

outputs = { self, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
};

naersk' = pkgs.callPackage naersk {};

in rec {
defaultPackage = naersk'.buildPackage {
src = ./.;
buildInputs = [pkgs.wayland];
nativeBuildInputs = [pkgs.makeWrapper];
postInstall = ''
wrapProgram $out/bin/yofi --prefix LD_LIBRARY_PATH : ${pkgs.wayland}/lib
'';
};

devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo wayland];
};
}
);
}

0 comments on commit fa7a0ca

Please sign in to comment.