refactor: debian translator without source

This commit is contained in:
DavHau 2022-08-20 16:59:34 +02:00
parent 170bd08838
commit c492204d37
3 changed files with 20 additions and 17 deletions

View File

@ -10,5 +10,11 @@
systems = ["x86_64-linux"];
config.projectRoot = ./.;
source = ./.;
projects = {
htop = {
name = "htop";
translator = "debian-binary";
};
};
});
}

View File

@ -8,19 +8,19 @@ in {
type = "impure";
/*
Allow dream2nix to detect if a given directory contains a project
which can be translated with this translator.
Usually this can be done by checking for the existence of specific
file names or file endings.
Alternatively a fully featured discoverer can be implemented under
`src/subsystems/{subsystem}/discoverers`.
This is recommended if more complex project structures need to be
discovered like, for example, workspace projects spanning over multiple
sub-directories
If a fully featured discoverer exists, do not define `discoverProject`.
*/
Allow dream2nix to detect if a given directory contains a project
which can be translated with this translator.
Usually this can be done by checking for the existence of specific
file names or file endings.
Alternatively a fully featured discoverer can be implemented under
`src/subsystems/{subsystem}/discoverers`.
This is recommended if more complex project structures need to be
discovered like, for example, workspace projects spanning over multiple
sub-directories
If a fully featured discoverer exists, do not define `discoverProject`.
*/
discoverProject = tree:
# Example
# Returns true if given directory contains a file ending with .cabal
@ -68,10 +68,8 @@ in {
# read the json input
export outputFile=$WORKDIR/$(jq '.outputFile' -c -r $jsonInput)
source=$(jq '.source' -c -r $jsonInput)
relPath=$(jq '.project.relPath' -c -r $jsonInput)
pkgsName=$(cat $source/deb-spec)
pkgsName=$(jq '.project.name' -c -r $jsonInput)
mkdir ./state
touch ./status

View File

@ -87,7 +87,6 @@ def main():
type="http",
url=uri.replace("http:", "https:").replace("'", ""),
hash=sha256,
version=version,
)
}