mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
remove deprecated tests in ./tests/pure
This commit is contained in:
parent
feb7eabd0c
commit
f1f1633804
36
flake.nix
36
flake.nix
@ -273,29 +273,23 @@
|
||||
'';
|
||||
});
|
||||
|
||||
checks =
|
||||
l.recursiveUpdate
|
||||
(forAllSystems (system: pkgs: (import ./tests/pure {
|
||||
inherit lib pkgs;
|
||||
dream2nix = dream2nixFor."${system}";
|
||||
})))
|
||||
(forAllSystems (system: pkgs: {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
treefmt = {
|
||||
enable = true;
|
||||
name = "treefmt";
|
||||
pass_filenames = false;
|
||||
entry = l.toString (pkgs.writeScript "treefmt" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
export PATH="$PATH:${alejandra.defaultPackage.${system}}/bin"
|
||||
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
||||
'');
|
||||
};
|
||||
checks = forAllSystems (system: pkgs: {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
treefmt = {
|
||||
enable = true;
|
||||
name = "treefmt";
|
||||
pass_filenames = false;
|
||||
entry = l.toString (pkgs.writeScript "treefmt" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
export PATH="$PATH:${alejandra.defaultPackage.${system}}/bin"
|
||||
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
||||
'');
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
});
|
||||
|
||||
templates = {
|
||||
simple = {
|
||||
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
lib ? pkgs.lib,
|
||||
pkgs ? import <nixpkgs> {},
|
||||
dream2nix ? import ./src {inherit pkgs;},
|
||||
}: let
|
||||
l = pkgs.lib // builtins;
|
||||
|
||||
buildProjectsTests = import ./projects.nix {
|
||||
inherit lib pkgs dream2nix;
|
||||
};
|
||||
|
||||
otherTests = import ./other {
|
||||
inherit lib pkgs dream2nix;
|
||||
};
|
||||
in
|
||||
buildProjectsTests
|
||||
// otherTests
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
lib ? pkgs.lib,
|
||||
pkgs ? import <nixpkgs> {},
|
||||
dream2nix ? import ./src {inherit pkgs;},
|
||||
}: let
|
||||
l = pkgs.lib // builtins;
|
||||
|
||||
fetchAggrgatedGithub =
|
||||
dream2nix.utils.toDrv
|
||||
(dream2nix.fetchSources {
|
||||
dreamLock = ./prettier-github-aggregated.json;
|
||||
})
|
||||
.fetchedSources
|
||||
.prettier
|
||||
."2.4.1";
|
||||
in {
|
||||
inherit fetchAggrgatedGithub;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"_generic": {
|
||||
"mainPackageName": "prettier",
|
||||
"mainPackageVersion": "2.4.1",
|
||||
"sourcesAggregatedHash": "sha256-ro6ysaTWAtUtKO0w3y7YFMq99nkOwucuwlKLBiFyuZ0=",
|
||||
"subsystem": "nodejs",
|
||||
"translatedBy": "nodejs.pure.yarn-lock",
|
||||
"translator": "yarn-lock",
|
||||
"translatorParams": ""
|
||||
},
|
||||
"_subsystem": {
|
||||
"nodejsVersion": "14"
|
||||
},
|
||||
"cyclicDependencies": {},
|
||||
"dependencies": {
|
||||
"prettier": {
|
||||
"2.4.1": []
|
||||
}
|
||||
},
|
||||
"sources": {
|
||||
"prettier": {
|
||||
"2.4.1": {
|
||||
"owner": "prettier",
|
||||
"repo": "prettier",
|
||||
"rev": "2.4.1",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
{
|
||||
lib ? pkgs.lib,
|
||||
pkgs ? import <nixpkgs> {},
|
||||
dream2nix ? import ./src {inherit pkgs;},
|
||||
}: let
|
||||
lib = pkgs.lib // builtins;
|
||||
|
||||
makeTest = {
|
||||
name,
|
||||
source,
|
||||
cmds,
|
||||
}: let
|
||||
outputs = dream2nix.makeOutputs {
|
||||
inherit source;
|
||||
};
|
||||
commandsToRun = cmds outputs;
|
||||
in
|
||||
pkgs.runCommand "test-${name}" {}
|
||||
(lib.concatStringsSep "\n" commandsToRun);
|
||||
|
||||
projects = {
|
||||
prettier = {
|
||||
source = lib.fetchTarball {
|
||||
url = "https://github.com/prettier/prettier/tarball/2.4.1";
|
||||
sha256 = "19b37qakhlsnr2n5bgv83aih5npgzbad1d2p2rs3zbq5syqbxdyi";
|
||||
};
|
||||
cmds = outputs: let
|
||||
prettier = outputs.defaultPackage.overrideAttrs (old: {
|
||||
dontBuild = true;
|
||||
});
|
||||
in [
|
||||
"${prettier}/bin/prettier --version | grep -q 2.4.1 && mkdir $out"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
allTests =
|
||||
lib.mapAttrs
|
||||
(name: args: makeTest (args // {inherit name;}))
|
||||
projects;
|
||||
in
|
||||
allTests
|
Loading…
Reference in New Issue
Block a user