Skip to content

Commit

Permalink
Merge branch 'main' into feat/graph-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjobeki authored and DavHau committed Oct 16, 2023
2 parents 491dc74 + 1caf997 commit 9141a18
Show file tree
Hide file tree
Showing 68 changed files with 402 additions and 387 deletions.
1 change: 0 additions & 1 deletion docs/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions docs/book.toml

This file was deleted.

12 changes: 0 additions & 12 deletions docs/src/SUMMARY.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/src/intro.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/theme/highlight.js

This file was deleted.

8 changes: 6 additions & 2 deletions examples/packages/multi-language/python-nodejs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ in {
fetchFromGitHub = nixpkgs.fetchFromGitHub;
};

mkDerivation = {
src = config.deps.fetchFromGitHub {
nodejs-package-lock = {
source = config.deps.fetchFromGitHub {
owner = "posativ";
repo = config.name;
rev = "refs/tags/${config.version}";
sha256 = "sha256-kZNf7Rlb1DZtQe4dK1B283OkzQQcCX+pbvZzfL65gsA=";
};
};

mkDerivation = {
src = config.nodejs-package-lock.source;

propagatedBuildInputs = [
# isso implicitly assumes that pkg_resources, which is
Expand Down
13 changes: 9 additions & 4 deletions examples/packages/single-language/nodejs-devshell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
}: {
imports = [
dream2nix.modules.dream2nix.nodejs-devshell
dream2nix.modules.dream2nix.nodejs-package-lock
];

mkDerivation = {
src = config.deps.fetchFromGitHub {
nodejs-package-lock = {
source = config.deps.fetchFromGitHub {
owner = "piuccio";
repo = "cowsay";
rev = "v1.5.0";
sha256 = "sha256-TZ3EQGzVptNqK3cNrkLnyP1FzBd81XaszVucEnmBy4Y=";
};
# allow devshell to be built -> CI pipeline happy
buildPhase = "mkdir $out";
};

deps = {nixpkgs, ...}: {
Expand All @@ -31,4 +30,10 @@

name = "cowsay";
version = "1.5.0";

mkDerivation = {
src = config.nodejs-package-lock.source;
# allow devshell to be built -> CI pipeline happy
buildPhase = "mkdir $out";
};
}
22 changes: 13 additions & 9 deletions examples/packages/single-language/nodejs-node-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,9 @@
}: {
imports = [
dream2nix.modules.dream2nix.nodejs-node-modules
dream2nix.modules.dream2nix.nodejs-package-lock
];

mkDerivation = {
src = config.deps.fetchFromGitHub {
owner = "piuccio";
repo = "cowsay";
rev = "v1.5.0";
sha256 = "sha256-TZ3EQGzVptNqK3cNrkLnyP1FzBd81XaszVucEnmBy4Y=";
};
};

deps = {nixpkgs, ...}: {
inherit
(nixpkgs)
Expand All @@ -26,6 +18,18 @@
;
};

nodejs-package-lock = {
source = config.deps.fetchFromGitHub {
owner = "piuccio";
repo = "cowsay";
rev = "v1.5.0";
sha256 = "sha256-TZ3EQGzVptNqK3cNrkLnyP1FzBd81XaszVucEnmBy4Y=";
};
};

name = "cowsay";
version = "1.5.0";
mkDerivation = {
src = config.nodejs-package-lock.source;
};
}
8 changes: 6 additions & 2 deletions examples/packages/single-language/nodejs-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
dream2nix.modules.dream2nix.nodejs-granular
];

mkDerivation = {
src = config.deps.fetchFromGitHub {
nodejs-package-lock = {
source = config.deps.fetchFromGitHub {
owner = "piuccio";
repo = "cowsay";
rev = "v1.5.0";
Expand All @@ -28,4 +28,8 @@

name = "cowsay";
version = "1.5.0";

mkDerivation = {
src = config.nodejs-package-lock.source;
};
}
33 changes: 19 additions & 14 deletions examples/packages/single-language/nodejs-project/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
in {
imports = [
dream2nix.modules.dream2nix.nodejs-package-json
dream2nix.modules.dream2nix.nodejs-package-lock
dream2nix.modules.dream2nix.nodejs-granular
];

mkDerivation = {
src = lib.cleanSource ./.;
checkPhase = ''
./app.js | ${config.deps.gnugrep}/bin/grep -q "Hello, World!"
'';
doCheck = true;
deps = {nixpkgs, ...}: {
inherit
(nixpkgs)
gnugrep
stdenv
;
};

nodejs-package-lock = {
source = lib.cleanSource ./.;
};

nodejs-granular = {
Expand All @@ -30,17 +35,17 @@ in {
'';
};

deps = {nixpkgs, ...}: {
inherit
(nixpkgs)
gnugrep
stdenv
;
};

name = lib.mkForce "app";
version = lib.mkForce "1.0.0";

lock.lockFileRel =
lib.mkForce "/locks/example-package-nodejs-no-lock/lock-${system}.json";

mkDerivation = {
src = config.nodejs-package-lock.source;
checkPhase = ''
./app.js | ${config.deps.gnugrep}/bin/grep -q "Hello, World!"
'';
doCheck = true;
};
}
22 changes: 13 additions & 9 deletions examples/packages/single-language/php-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
dream2nix.modules.dream2nix.php-granular
];

mkDerivation = {
src = config.deps.fetchFromGitHub {
owner = "Gipetto";
repo = "CowSay";
rev = config.version;
sha256 = "sha256-jriyCzmvT2pPeNQskibBg0Bsh+h64cAEO+yOOfX2wbA=";
};
};

deps = {nixpkgs, ...}: {
inherit
(nixpkgs)
Expand All @@ -28,4 +19,17 @@

name = "cowsay";
version = "1.2.0";

php-composer-lock = {
source = config.deps.fetchFromGitHub {
owner = "Gipetto";
repo = "CowSay";
rev = config.version;
sha256 = "sha256-jriyCzmvT2pPeNQskibBg0Bsh+h64cAEO+yOOfX2wbA=";
};
};

mkDerivation = {
src = config.php-composer-lock.source;
};
}
15 changes: 0 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,6 @@
};
};
};

packages = {
docs =
pkgs.runCommand
"dream2nix-docs"
{nativeBuildInputs = [pkgs.bash pkgs.mdbook];}
''
bash -c "
errors=$(mdbook build -d $out ${./.}/docs |& grep ERROR)
if [ \"$errors\" ]; then
exit 1
fi
"
'';
};
};
in
flake-parts.lib.mkFlake {inherit inputs;} {
Expand Down
Loading

0 comments on commit 9141a18

Please sign in to comment.