mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
refactor: debian translator without source
This commit is contained in:
parent
170bd08838
commit
c492204d37
@ -10,5 +10,11 @@
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = ./.;
|
||||
projects = {
|
||||
htop = {
|
||||
name = "htop";
|
||||
translator = "debian-binary";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -87,7 +87,6 @@ def main():
|
||||
type="http",
|
||||
url=uri.replace("http:", "https:").replace("'", ""),
|
||||
hash=sha256,
|
||||
version=version,
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user