Skip to content

Commit

Permalink
(WIP)try to use nix
Browse files Browse the repository at this point in the history
  • Loading branch information
butterunderflow committed Aug 31, 2024
1 parent 85f089d commit 20340f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
let
pkgs = import <nixpkgs> { };
stdenv = pkgs.stdenv;
in {
shell = pkgs.mkShell {
name = "fun-for-fun";
args = [ "build" ];
src = [ ./lib ./dune-project ];
system = builtins.currentSystem;
buildInputs = with pkgs; [ opam cmake ];
# fixme: I failed to install package by package manager outside nix, maybe it's bad practice.
# shellHooks = ''
# opam install . --deps-only --with-test --yes
# opam install merlin --yes
# '';
};
}
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

(import ./default.nix).shell

0 comments on commit 20340f3

Please sign in to comment.