Skip to content

Commit

Permalink
chore: nix flake for notty (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter authored Oct 2, 2023
1 parent cb7221c commit 58061ba
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Build"
on:
pull_request:
push:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
- name: "Run nix flake check"
run: nix flake check
- name: "Run nix build"
run: nix build

60 changes: 60 additions & 0 deletions flake.lock

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

31 changes: 31 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "Notty Nix Flake";

inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
inherit (pkgs.ocamlPackages) buildDunePackage;
in
rec {
packages = rec {
default = notty;
notty = buildDunePackage {
pname = "notty";
version = "n/a";
src = ./.;
duneVersion = "3";
nativeBuildInputs = with pkgs.ocamlPackages; [ cppo ];
propagatedBuildInputs = with pkgs.ocamlPackages; [ uutf ];
doCheck = true;
};
};
devShells.default = pkgs.mkShell {
inputsFrom = pkgs.lib.attrValues packages;
buildInputs = with pkgs.ocamlPackages; [ ocaml-lsp ];
};
});
}

0 comments on commit 58061ba

Please sign in to comment.