Skip to content

Commit

Permalink
Move flake at top-level for it to work correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Niols committed Apr 28, 2023
1 parent 25852d4 commit 13bfeab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/nix/with-nixpkgs.nix → .nix/with-nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
in {
packages.with-nixpkgs = pkgs.stdenv.mkDerivation {
name = "morbig";
## NOTE: The use of `../..` matters because the path is taken as relative to
## the current file, and therefore to `.github/nix/`.
src = ../..;
## NOTE: The use of `./..` matters because the path is taken as relative to
## the current file, and therefore to `.nix/`.
src = ./..;

nativeBuildInputs = with opkgs; [
## Basic ones, always necessary
Expand Down
6 changes: 3 additions & 3 deletions .github/nix/with-opam-nix.nix → .nix/with-opam-nix.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ ... }: {
perSystem = { inputs', pkgs, ... }:
## NOTE: The use of `../..` matters because the path is taken as relative to
## the current file, and therefore to `.github/nix/`.
## NOTE: The use of `./..` matters because the path is taken as relative to
## the current file, and therefore to `.nix/`.
let
scope =
inputs'.opam-nix.lib.buildOpamProject { inherit pkgs; } "morbig" ../.. {
inputs'.opam-nix.lib.buildOpamProject { inherit pkgs; } "morbig" ./.. {
ocaml-base-compiler = "*";
};
in { packages.with-opam-nix = scope.morbig // { inherit scope; }; };
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/nix/flake.nix → flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
systems = [ "x86_64-linux" ];

imports = [
./with-nixpkgs.nix
./with-opam-nix.nix
.nix/with-nixpkgs.nix
.nix/with-opam-nix.nix
inputs.pre-commit-hooks.flakeModule
];

Expand Down

0 comments on commit 13bfeab

Please sign in to comment.