generated from srid/rib-sample
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* flake.nix: add basic support * Use flake-compat to derive default.nix & shell.nix from flake.nix - introduce flake-compat - pin nixpkgs at flake.lock - modify how we import default.nix/shell.nix * Move pinned nixpkgs from dep/nixpkgs to flake.lock * CI: now build and test with nix flake as well * Up ver to 1.9.17.1
- Loading branch information
Showing
15 changed files
with
141 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ dist-* | |
.ghc.environment.* | ||
result | ||
result-2 | ||
result-data | ||
.shake | ||
.neuron | ||
neuron.prof | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ system ? builtins.currentSystem }: | ||
let | ||
pkgs = import ./dep/nixpkgs { inherit system; }; | ||
pkgs = import ./nixpkgs.nix { inherit system; }; | ||
in | ||
pkgs.recurseIntoAttrs { | ||
# Build both default.nix and shell.nix such that both derivations are | ||
# pushed to cachix. This allows the development workflow (bin/run, etc.) to | ||
# use cachix to full extent. | ||
neuron = import ./default.nix {}; | ||
neuronShell = import ./shell.nix {}; | ||
neuron = import ./default.nix; | ||
neuronShell = import ./shell.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
args@{ system ? builtins.currentSystem, ...}: | ||
let | ||
pkgs = import ./dep/nixpkgs { inherit system; } ; | ||
in (import ./project.nix { pkgs = pkgs; } ).neuron | ||
(import | ||
( | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{ | ||
src = ./.; | ||
}).defaultNix |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
description = "Future-proof note-taking and publishing based on Zettelkasten"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/fcab19deb78fbb5ea24e19b133cf34358176396a"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
flake-compat = { | ||
url = "github:edolstra/flake-compat"; | ||
flake = false; | ||
}; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
project = import ./project.nix { inherit pkgs; }; | ||
|
||
in rec { | ||
packages = { neuron = project.neuron; }; | ||
defaultPackage = packages.neuron; | ||
|
||
apps = { neuron = flake-utils.lib.mkApp { drv = packages.neuron; }; }; | ||
defaultApp = apps.neuron; | ||
|
||
devShell = project.shell; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
nixpkgs = lock.nodes.nixpkgs.locked; | ||
|
||
in import (fetchTarball { | ||
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs.rev}.tar.gz"; | ||
sha256 = nixpkgs.narHash; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
args@{ ... }: (import ./project.nix args).shell | ||
(import | ||
( | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{ | ||
src = ./.; | ||
}).shellNix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters