mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-23 09:04:37 +03:00
remove legacy examples + example tests
This commit is contained in:
parent
7f2965906c
commit
336cbfc254
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
autoProjects = true;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
}:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = {
|
||||
prettier = {
|
||||
name = "prettier";
|
||||
subsystem = "nodejs";
|
||||
translator = "yarn-lock";
|
||||
};
|
||||
};
|
||||
})
|
||||
// {
|
||||
# checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp: let
|
||||
nixpkgs = dream2nix.inputs.nixpkgs;
|
||||
l = nixpkgs.lib // builtins;
|
||||
|
||||
systems = ["x86_64-linux"];
|
||||
forAllSystems = f:
|
||||
l.genAttrs systems (
|
||||
system:
|
||||
f system (nixpkgs.legacyPackages.${system})
|
||||
);
|
||||
|
||||
d2n-flake = dream2nix.lib.makeFlakeOutputs {
|
||||
inherit systems;
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
};
|
||||
in
|
||||
dream2nix.lib.dlib.mergeFlakes [
|
||||
d2n-flake
|
||||
{
|
||||
devShells = forAllSystems (system: pkgs: (
|
||||
l.optionalAttrs
|
||||
(d2n-flake ? devShells.${system}.prettier.overrideAttrs)
|
||||
rec {
|
||||
default = prettier;
|
||||
prettier =
|
||||
d2n-flake.devShells.${system}.prettier.overrideAttrs
|
||||
(old: {
|
||||
buildInputs =
|
||||
old.buildInputs
|
||||
++ [
|
||||
pkgs.hello
|
||||
];
|
||||
});
|
||||
}
|
||||
));
|
||||
}
|
||||
{
|
||||
# checks.x86_64-linux.prettier = self.packages.x86_64-linux.prettier;
|
||||
}
|
||||
];
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[prettier]
|
||||
name = "prettier"
|
||||
relPath = ""
|
||||
subsystem = "nodejs"
|
||||
translator = "yarn-lock"
|
@ -1,13 +0,0 @@
|
||||
{config, ...}: let
|
||||
inherit (config.pkgs) hello;
|
||||
in {
|
||||
builders.dummy = {...}: {
|
||||
name = "dummy";
|
||||
subsystem = "hello";
|
||||
type = "pure";
|
||||
build = {...}: {
|
||||
packages.${hello.pname}.${hello.version} =
|
||||
hello;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{config, ...}: {
|
||||
discoverers.dummy = rec {
|
||||
name = "dummy";
|
||||
subsystem = "hello";
|
||||
discover = {tree}: [
|
||||
(config.dlib.construct.discoveredProject {
|
||||
inherit subsystem name;
|
||||
inherit (tree) relPath;
|
||||
translators = ["dummy"];
|
||||
subsystemInfo = {};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "path:../..";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
config.modules = [
|
||||
./discoverers.nix
|
||||
./translators.nix
|
||||
./builders.nix
|
||||
];
|
||||
source = ./.;
|
||||
# The dummy discoverer will discover a project `hello` automatically.
|
||||
autoProjects = true;
|
||||
})
|
||||
// {
|
||||
checks.x86_64-linux.hello = self.packages.x86_64-linux.hello;
|
||||
};
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{config, ...}: let
|
||||
inherit (config.pkgs) hello;
|
||||
in {
|
||||
translators.dummy = {...}: {
|
||||
type = "pure";
|
||||
name = "dummy";
|
||||
subsystem = "hello";
|
||||
translate = {...}: {
|
||||
result = {
|
||||
_generic = {
|
||||
subsystem = "hello";
|
||||
defaultPackage = "hello";
|
||||
location = "";
|
||||
sourcesAggregatedHash = null;
|
||||
packages = {${hello.pname} = hello.version;};
|
||||
};
|
||||
_subsystem = {};
|
||||
cyclicDependencies = {};
|
||||
dependencies.${hello.pname}.${hello.version} = [];
|
||||
sources.${hello.pname}.${hello.version} = {
|
||||
type = "http";
|
||||
url = hello.src.url;
|
||||
hash = hello.src.outputHash;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "path:../..";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
config.modules = [
|
||||
(builtins.toFile "cargo-toml-new.nix" ''
|
||||
{
|
||||
translators.cargo-toml-new = {
|
||||
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/translators/cargo-toml" attrs.framework)];
|
||||
name = "cargo-toml-new";
|
||||
subsystem = "rust";
|
||||
};
|
||||
}
|
||||
'')
|
||||
(builtins.toFile "brp-new.nix" ''
|
||||
{
|
||||
builders.brp-new = {
|
||||
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/builders/build-rust-package" attrs.framework)];
|
||||
name = "brp-new";
|
||||
subsystem = "rust";
|
||||
};
|
||||
}
|
||||
'')
|
||||
(builtins.toFile "cargo-new.nix" ''
|
||||
{
|
||||
discoverers.cargo-new = {
|
||||
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/discoverers/cargo" attrs.framework)];
|
||||
name = "cargo-new";
|
||||
subsystem = "rust";
|
||||
};
|
||||
}
|
||||
'')
|
||||
(builtins.toFile "crates-io-new.nix" ''
|
||||
{config, ...}: {
|
||||
fetchers.crates-io = config.lib.mkForce {
|
||||
imports = [(attrs: import "${inp.dream2nix}/src/fetchers/crates-io" attrs.framework)];
|
||||
};
|
||||
}
|
||||
'')
|
||||
];
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[linemd]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
subsystem = "rust"
|
||||
translator = "cargo-lock"
|
||||
translators = [ "cargo-lock", "cargo-toml",]
|
||||
|
||||
[[linemd.subsystemInfo.crates]]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
version = "0.4.0"
|
||||
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
nixpkgs.follows = "dream2nix/nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
flake-parts,
|
||||
src,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit self;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [dream2nix.flakeModuleBeta];
|
||||
|
||||
perSystem = {config, ...}: {
|
||||
# define an input for dream2nix to generate outputs for
|
||||
dream2nix.inputs."prettier" = {
|
||||
source = src;
|
||||
projects = {
|
||||
prettier = {
|
||||
subsystem = "nodejs";
|
||||
translator = "yarn-lock";
|
||||
};
|
||||
};
|
||||
};
|
||||
packages = {
|
||||
inherit (config.dream2nix.outputs.prettier.packages) prettier;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = inp:
|
||||
(inp.dream2nix.lib.makeFlakeOutputsForIndexes {
|
||||
source = ./.;
|
||||
systems = ["x86_64-linux"];
|
||||
indexes = [
|
||||
{
|
||||
name = "libraries-io";
|
||||
platform = "npm";
|
||||
number = 5;
|
||||
}
|
||||
{
|
||||
name = "crates-io";
|
||||
}
|
||||
{
|
||||
name = "crates-io-simple";
|
||||
sortBy = "name";
|
||||
maxPages = 1;
|
||||
}
|
||||
];
|
||||
packageOverrides = {
|
||||
"^.*$".disable-build = {
|
||||
buildScript = ":";
|
||||
};
|
||||
};
|
||||
})
|
||||
// {
|
||||
checks = inp.self.packages;
|
||||
};
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "path:../..";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = inp: let
|
||||
l = inp.dream2nix.inputs.nixpkgs.lib // builtins;
|
||||
|
||||
allPkgs =
|
||||
l.map
|
||||
# nixpkgs could be imported manually here with overrides etc.
|
||||
(system: inp.dream2nix.inputs.nixpkgs.legacyPackages.${system})
|
||||
["x86_64-linux" "aarch64-linux"];
|
||||
in
|
||||
inp.dream2nix.lib.makeFlakeOutputs {
|
||||
pkgs = allPkgs;
|
||||
config.projectRoot = ./.;
|
||||
source = inp.src;
|
||||
projects = ./projects.toml;
|
||||
};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[linemd]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
subsystem = "rust"
|
||||
translator = "cargo-lock"
|
||||
builder = "build-rust-package"
|
||||
|
||||
[[linemd.subsystemInfo.crates]]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
version = "0.4.0"
|
||||
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = {
|
||||
linemd = {
|
||||
name = "linemd";
|
||||
subsystem = "rust";
|
||||
translator = "cargo-lock";
|
||||
};
|
||||
};
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
} @ inp: (dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = ./.;
|
||||
projects = {
|
||||
htop = {
|
||||
name = "htop";
|
||||
translator = "debian-binary";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:leungbk/unordered-containers/cabal-freeze-test";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp: (dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
});
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[main]
|
||||
name = "main"
|
||||
relPath = ""
|
||||
subsystem = "haskell"
|
||||
translator = "cabal-freeze"
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:NorfairKing/cabal2json/plan-json";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
pkgs = dream2nix.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
source = src;
|
||||
config.projectRoot = ./.;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.cabal2json = self.packages.x86_64-linux.cabal2json.overrideAttrs (old: {
|
||||
# doCheck = false;
|
||||
# });
|
||||
};
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[main]
|
||||
name = "main"
|
||||
relPath = ""
|
||||
subsystem = "haskell"
|
||||
translator = "cabal-plan"
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:NorfairKing/cabal2json/plan-json";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
pkgs = dream2nix.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
source = src;
|
||||
config.projectRoot = ./.;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.cabal2json = self.packages.x86_64-linux.cabal2json.overrideAttrs (old: {
|
||||
# doCheck = false;
|
||||
# });
|
||||
};
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[cabal2json]
|
||||
name = "cabal2json"
|
||||
relPath = ""
|
||||
subsystem = "haskell"
|
||||
translator = "cabal"
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:NorfairKing/cabal2json";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
pkgs = dream2nix.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
source = src;
|
||||
config.projectRoot = ./.;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[main]
|
||||
name = "main"
|
||||
relPath = ""
|
||||
subsystem = "haskell"
|
||||
translator = "stack-lock"
|
||||
translators = [ "stack-lock",]
|
||||
|
||||
[[main.subsystemInfo.compiler]]
|
||||
name = "ghc"
|
||||
version = "8.10.7"
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
This example uses an alternative builder
|
||||
(available builders see: src/subsystems/nodejs/builders )
|
||||
Building 'Prettier@2.4.1'.
|
||||
*/
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
}:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
checks.x86_64-linux.prettier = self.packages.x86_64-linux.prettier;
|
||||
};
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[prettier]
|
||||
name = "prettier"
|
||||
relPath = ""
|
||||
subsystem = "nodejs"
|
||||
translator = "yarn-lock"
|
||||
builder = "strict-builder"
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[eslint]
|
||||
name = "eslint"
|
||||
relPath = ""
|
||||
subsystem = "nodejs"
|
||||
translator = "package-json"
|
||||
translators = ["package-json"]
|
||||
|
||||
[eslint.subsystemInfo]
|
||||
noDev = true
|
||||
nodejs = 18
|
||||
aggregated = true
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[eslint]
|
||||
name = "eslint"
|
||||
relPath = ""
|
||||
subsystem = "nodejs"
|
||||
translator = "package-json"
|
||||
translators = ["package-json"]
|
||||
|
||||
[eslint.subsystemInfo]
|
||||
noDev = true
|
||||
nodejs = 18
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
checks.x86_64-linux.prettier = self.packages.x86_64-linux.prettier;
|
||||
};
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[prettier]
|
||||
name = "prettier"
|
||||
relPath = ""
|
||||
subsystem = "nodejs"
|
||||
translator = "yarn-lock"
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = ./.;
|
||||
autoProjects = true;
|
||||
})
|
||||
// {
|
||||
checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "path-test",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
]
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { getHello } = require("lib");
|
||||
|
||||
console.log(getHello());
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"name": "cli",
|
||||
"version": "1.0.0",
|
||||
"bin": {
|
||||
"cli": "bin/cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"lib": "^1.0.0"
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "lib",
|
||||
"version": "1.0.0",
|
||||
"main": "src/main.js",
|
||||
"dependencies": {
|
||||
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
const getHello = () => "Salve, mundus!";
|
||||
|
||||
module.exports = { getHello };
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:Gipetto/CowSay";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks = self.packages;
|
||||
};
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
["gipetto/cowsay"]
|
||||
name = "gipetto/cowsay"
|
||||
relPath = ""
|
||||
subsystem = "php"
|
||||
translator = "composer-lock"
|
||||
translators = [ "composer-lock", "composer-json",]
|
||||
|
||||
["gipetto/cowsay".subsystemInfo]
|
@ -1,39 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
nixpkgs.follows = "dream2nix/nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
src.url = "gitlab:ternaris/rosbags";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
flake-parts,
|
||||
src,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit self;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [dream2nix.flakeModuleBeta];
|
||||
|
||||
perSystem = {
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
# define an input for dream2nix to generate outputs for
|
||||
dream2nix.inputs."rosbags" = {
|
||||
source = src;
|
||||
projects.rosbags = {
|
||||
subsystem = "python";
|
||||
translator = "pip-freeze";
|
||||
subsystemInfo.system = system;
|
||||
subsystemInfo.pythonVersion = "3.10";
|
||||
};
|
||||
};
|
||||
# checks.package = config.dream2nix.outputs.rosbags.packages.default;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "https://files.pythonhosted.org/packages/5a/86/5f63de7a202550269a617a5d57859a2961f3396ecd1739a70b92224766bc/aiohttp-3.8.1.tar.gz";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
checks.x86_64-linux = self.packages.x86_64-linux;
|
||||
};
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[aiohttp]
|
||||
name = "aiohttp"
|
||||
relPath = ""
|
||||
subsystem = "python"
|
||||
translator = "pip"
|
||||
|
||||
[aiohttp.subsystemInfo]
|
||||
pythonAttr = "python3"
|
||||
pythonVersion = "3.8"
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
nixpkgs.follows = "dream2nix/nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
src.url = "github:python-poetry/poetry";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
flake-parts,
|
||||
src,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit self;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [dream2nix.flakeModuleBeta];
|
||||
|
||||
perSystem = {
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
# define an input for dream2nix to generate outputs for
|
||||
dream2nix.inputs."my-project" = {
|
||||
source = src;
|
||||
projects.my-project = {
|
||||
subsystem = "python";
|
||||
translator = "poetry";
|
||||
subsystemInfo.system = system;
|
||||
subsystemInfo.pythonVersion = "3.10";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
|
||||
goblins.url = "gitlab:leungbk/goblins";
|
||||
goblins.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
goblins,
|
||||
} @ inp: (dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = goblins;
|
||||
projects = ./projects.toml;
|
||||
});
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[goblins]
|
||||
name = "goblins"
|
||||
relPath = "goblins"
|
||||
subsystem = "racket"
|
||||
translator = "racket-impure"
|
||||
|
||||
[goblins.subsystemInfo]
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[linemd]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
subsystem = "rust"
|
||||
translator = "cargo-toml"
|
||||
builder = "crane"
|
||||
|
||||
|
||||
[[linemd.subsystemInfo.crates]]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
version = "0.4.0"
|
||||
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:BurntSushi/ripgrep/13.0.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.ripgrep = self.packages.x86_64-linux.ripgrep;
|
||||
};
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[ripgrep]
|
||||
name = "ripgrep"
|
||||
relPath = ""
|
||||
subsystem = "rust"
|
||||
translator = "cargo-lock"
|
||||
translators = [ "cargo-lock", "cargo-toml",]
|
||||
builder = "crane"
|
||||
|
||||
[ripgrep.subsystemInfo]
|
||||
workspaceMembers = [ "crates/globset", "crates/grep", "crates/cli", "crates/matcher", "crates/pcre2", "crates/printer", "crates/regex", "crates/searcher", "crates/ignore",]
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "ripgrep"
|
||||
relPath = ""
|
||||
version = "13.0.0"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-cli"
|
||||
relPath = "crates/cli"
|
||||
version = "0.1.6"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "globset"
|
||||
relPath = "crates/globset"
|
||||
version = "0.4.7"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep"
|
||||
relPath = "crates/grep"
|
||||
version = "0.2.8"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "ignore"
|
||||
relPath = "crates/ignore"
|
||||
version = "0.4.18"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-matcher"
|
||||
relPath = "crates/matcher"
|
||||
version = "0.1.5"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-pcre2"
|
||||
relPath = "crates/pcre2"
|
||||
version = "0.1.5"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-printer"
|
||||
relPath = "crates/printer"
|
||||
version = "0.1.6"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-regex"
|
||||
relPath = "crates/regex"
|
||||
version = "0.1.9"
|
||||
|
||||
[[ripgrep.subsystemInfo.crates]]
|
||||
name = "grep-searcher"
|
||||
relPath = "crates/searcher"
|
||||
version = "0.1.8"
|
||||
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
fenix.url = "github:nix-community/fenix/720b54260dee864d2a21745bd2bb55223f58e297";
|
||||
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
dream2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
fenix,
|
||||
src,
|
||||
...
|
||||
} @ inp: let
|
||||
system = "x86_64-linux";
|
||||
toolchain = fenix.packages.${system}.minimal.toolchain;
|
||||
in
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = [system];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = ./projects.toml;
|
||||
packageOverrides = {
|
||||
# override all packages and set a toolchain
|
||||
"^.*" = {
|
||||
set-toolchain.overrideRustToolchain = old: {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
};
|
||||
check-toolchain-version.overrideAttrs = old: {
|
||||
buildPhase = ''
|
||||
currentCargoVersion="$(cargo --version)"
|
||||
customCargoVersion="$(${toolchain}/bin/cargo --version)"
|
||||
if [[ "$currentCargoVersion" != "$customCargoVersion" ]]; then
|
||||
echo "cargo version is $currentCargoVersion but it needs to be $customCargoVersion"
|
||||
exit 1
|
||||
fi
|
||||
${old.buildPhase or ""}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# To re-generate this file, run:
|
||||
# nix run github:nix-community/dream2nix#detect-projects $source
|
||||
# ... where `$source` points to the source of your project.
|
||||
|
||||
[linemd]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
subsystem = "rust"
|
||||
translator = "cargo-lock"
|
||||
builder = "build-rust-package"
|
||||
|
||||
[[linemd.subsystemInfo.crates]]
|
||||
name = "linemd"
|
||||
relPath = ""
|
||||
version = "0.4.0"
|
||||
|
@ -1,7 +0,0 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "app"
|
||||
version = "1.0.0"
|
@ -1,5 +0,0 @@
|
||||
[workspace]
|
||||
members = ["app"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
@ -1,3 +0,0 @@
|
||||
[package]
|
||||
name = "app"
|
||||
version.workspace = true
|
@ -1,3 +0,0 @@
|
||||
fn main() {
|
||||
println!("hello from v{}", env!("CARGO_PKG_VERSION"));
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
} @ inp:
|
||||
dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = ./.;
|
||||
autoProjects = true;
|
||||
};
|
||||
}
|
22
flake.nix
22
flake.nix
@ -290,28 +290,6 @@
|
||||
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
||||
'');
|
||||
};
|
||||
cleanup = {
|
||||
enable = true;
|
||||
name = "cleanup";
|
||||
entry = l.toString (pkgs.writeScript "cleanup" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
for badFile in $(find ./examples | grep 'flake.lock\|dream2nix-packages'); do
|
||||
rm -rf $badFile
|
||||
git add $badFile || :
|
||||
done
|
||||
'');
|
||||
};
|
||||
is-cleaned = {
|
||||
enable = true;
|
||||
name = "is-cleaned";
|
||||
entry = l.toString (pkgs.writeScript "is-cleaned" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
if find ./examples | grep -q 'flake.lock\|dream2nix-packages'; then
|
||||
echo "./examples should not contain any flake.lock files or dream2nix-packages directories" >&2
|
||||
exit 1
|
||||
fi
|
||||
'');
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,41 +6,32 @@
|
||||
l = lib // builtins;
|
||||
in {
|
||||
flake = {
|
||||
templates =
|
||||
{
|
||||
default = self.templates.simple;
|
||||
simple = {
|
||||
description = "Simple dream2nix flake";
|
||||
path = ./simple;
|
||||
welcomeText = ''
|
||||
You just created a simple dream2nix package!
|
||||
templates = {
|
||||
default = self.templates.simple;
|
||||
simple = {
|
||||
description = "Simple dream2nix flake";
|
||||
path = ./simple;
|
||||
welcomeText = ''
|
||||
You just created a simple dream2nix package!
|
||||
|
||||
start with typing `nix flake show` to discover the projects attributes.
|
||||
start with typing `nix flake show` to discover the projects attributes.
|
||||
|
||||
commands:
|
||||
commands:
|
||||
|
||||
- `nix develop` <-- enters the devShell
|
||||
- `nix build .#` <-- builds the default package (`.#default`)
|
||||
- `nix develop` <-- enters the devShell
|
||||
- `nix build .#` <-- builds the default package (`.#default`)
|
||||
|
||||
|
||||
Start hacking and -_- have some fun!
|
||||
Start hacking and -_- have some fun!
|
||||
|
||||
> dont forget to add nix `result` folder to your `.gitignore`
|
||||
> dont forget to add nix `result` folder to your `.gitignore`
|
||||
|
||||
'';
|
||||
};
|
||||
v1-python = {
|
||||
description = "Simple dream2nix python project";
|
||||
path = ./v1-python;
|
||||
};
|
||||
}
|
||||
// (
|
||||
l.genAttrs
|
||||
(self.lib.dlib.listDirs ../examples)
|
||||
(name: {
|
||||
description = "Example: ${name} template";
|
||||
path = ../examples/${name};
|
||||
})
|
||||
);
|
||||
'';
|
||||
};
|
||||
v1-python = {
|
||||
description = "Simple dream2nix python project";
|
||||
path = ./v1-python;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -33,11 +33,6 @@
|
||||
b.toString
|
||||
(callTests ./integration-d2n-flakes);
|
||||
|
||||
tests-examples.type = "app";
|
||||
tests-examples.program =
|
||||
b.toString
|
||||
(callTests ./examples);
|
||||
|
||||
tests-all.type = "app";
|
||||
tests-all.program =
|
||||
b.toString
|
||||
|
@ -1,76 +0,0 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
async,
|
||||
bash,
|
||||
coreutils,
|
||||
git,
|
||||
gnugrep,
|
||||
jq,
|
||||
parallel,
|
||||
nix,
|
||||
pkgs,
|
||||
framework,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
examples = ../../examples;
|
||||
testScript =
|
||||
framework.utils.writePureShellScript
|
||||
[
|
||||
async
|
||||
bash
|
||||
coreutils
|
||||
git
|
||||
gnugrep
|
||||
jq
|
||||
nix
|
||||
]
|
||||
''
|
||||
cd $TMPDIR
|
||||
dir=$1
|
||||
shift
|
||||
echo -e "\ntesting example for $dir"
|
||||
start_time=$(date +%s)
|
||||
cp -r ${examples}/$dir/* .
|
||||
chmod -R +w .
|
||||
if [ -n "''${NIX:-}" ]; then
|
||||
PATH="$(dirname $NIX):$PATH"
|
||||
fi
|
||||
nix flake lock --override-input dream2nix ${../../.}
|
||||
if nix flake show | grep -q resolveImpure; then
|
||||
nix run .#resolveImpure --show-trace
|
||||
fi
|
||||
# disable --read-only check for these because they do IFD so they will
|
||||
# write to store at eval time
|
||||
evalBlockList=("haskell_cabal-plan" "haskell_stack-lock")
|
||||
if [[ ! ((''${evalBlockList[*]} =~ "$dir")) ]] \
|
||||
&& [ "$(nix flake show --json | jq 'select(.packages."x86_64-linux".default.name)')" != "" ]; then
|
||||
nix eval --read-only --no-allow-import-from-derivation .#default.name
|
||||
fi
|
||||
nix flake check "$@"
|
||||
end_time=$(date +%s)
|
||||
elapsed=$(( end_time - start_time ))
|
||||
echo -e "testing example for $dir took $elapsed seconds"
|
||||
echo "$elapsed sec: $dir" >> $STATS_FILE
|
||||
'';
|
||||
in
|
||||
framework.utils.writePureShellScript
|
||||
[
|
||||
coreutils
|
||||
parallel
|
||||
]
|
||||
''
|
||||
export STATS_FILE=$(mktemp)
|
||||
if [ -z ''${1+x} ]; then
|
||||
JOBS=''${JOBS:-$(nproc)}
|
||||
parallel --halt now,fail=1 -j$JOBS -a <(ls ${examples}) ${testScript}
|
||||
else
|
||||
arg1=$1
|
||||
shift
|
||||
${testScript} $arg1 "$@"
|
||||
fi
|
||||
echo -e "\nExecution times:"
|
||||
cat $STATS_FILE | sort --numeric-sort
|
||||
rm $STATS_FILE
|
||||
''
|
Loading…
Reference in New Issue
Block a user