summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorDaniel B. Hill <daniel@gluo.nz>2022-01-12 00:26:05 +1300
committerKent Overstreet <kent.overstreet@gmail.com>2022-05-30 22:26:27 -0400
commit962390c0b2e90c1c85abfe69b8b76fd7ef3925ee (patch)
tree12afc57ec32fda70ab156311c91d4219c15b0bab /default.nix
parent03ed64edc88343665ebd38eaaeebeba0229b1974 (diff)
Simplify Nix(OS) development
Signed-off-by: Daniel B. Hill <daniel@gluo.nz>
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix26
1 files changed, 6 insertions, 20 deletions
diff --git a/default.nix b/default.nix
index 48f2aa93..a693194e 100644
--- a/default.nix
+++ b/default.nix
@@ -1,6 +1,5 @@
{ lib
-, filter
-
+, doCheck ? true
, stdenv
, pkg-config
, attr
@@ -20,8 +19,7 @@
, docutils
, nixosTests
-, lastModified
-, versionString ? lastModified
+, versionString ? "0.1"
, inShell ? false
, debugMode ? inShell
@@ -39,20 +37,8 @@ stdenv.mkDerivation {
version = "v0.1-flake-${versionString}";
VERSION = "v0.1-flake-${versionString}";
-
- src = filter.filter {
- name = "bcachefs-tools";
- root = ./.;
- exclude = [
- ./rust-src
-
- ./.git
- ./nix
-
- ./flake.nix
- ./flake.lock
- ];
- };
+
+ src = (lib.cleanSource (builtins.path { name = "bcachefs-tools-src"; path = ./. ;} ));
postPatch = "patchShebangs --build doc/macro2rst.py";
@@ -95,7 +81,7 @@ stdenv.mkDerivation {
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
];
- doCheck = true; # needs bcachefs module loaded on builder
+ doCheck = doCheck; # needs bcachefs module loaded on builder
checkInputs = [
python39Packages.pytest
@@ -116,7 +102,7 @@ stdenv.mkDerivation {
rm tests/test_fuse.py
'';
- dontStrip = debugMode == true;
+ dontStrip = debugMode;
passthru = {
bcachefs_revision = let
file = builtins.readFile ./.bcachefs_revision;