[Nix-dev] out is not an absolute path?

stewart mackenzie setori88 at gmail.com
Wed Jan 20 22:11:23 CET 2016


I've got a small annoying problem:

This code: https://github.com/sjmackenzie/fractalide/blob/master/build-support/component-lookup/default.nix#L12

generates this output:

error: string ‘$out’ doesn't represent an absolute path, at
/home/stewart/dev/fractalide/fractalide/build-support/component-lookup/default.nix:12:74
(use ‘--show-trace’ to show detailed location information)

It should generate this output:

fn get(name: &str) -> Option<&str> {
    match name {
        "development_fvm" => { Some
("5w7qgrls6xzbm5sczmfybbd3kfn69r2k-development_fvm")},
"development_parser_fbp_lexical" => { Some
("93nw3ygbkq2ms7kcmxqnqd36p9sam50a-development_parser_fbp_lexical")},
"development_parser_fbp_print_graph" => { Some
("7n8brg8s0zmc4r5c3dnzk98hm1azfm3v-development_parser_fbp_print_graph")},
"development_parser_fbp_semantic" => { Some
("w515c4k2p4xf11zsmv1hgfa99zsg46mv-development_parser_fbp_semantic")},
"file_open" => { Some ("rgx12nf2myagh5rvg6a6ij055cjs16lb-file_open")},
"file_print" => { Some ("53m297qjh9bsq7sl39fmc5am1dx3zkb0-file_print")},
"maths_boolean_nand" => { Some
("d0vn4c8mmlc2bxq05z3cbrpd5rp4w5p6-maths_boolean_nand")},
"maths_boolean_not" => { Some
("sb0zvb745y82k4r6f1rfh7v5mpx9hd0j-maths_boolean_not")},
"maths_number_add" => { Some
("h2kfzfa8wa0raf5y0dkqp5qcf55c9bqq-maths_number_add")},
"component_lookup" => { Some
("qfi08r60a06risivrr5rgmq7ng18w030-component_lookup")},
"contract_lookup" => { Some
("lc9vfh8jrv9ps2a141w45948hrckr6n7-contract_lookup")},
        _ => None,
    }
}

notice the "component_lookup", well if I remove the (builtins.toPath
"$out") leaving just "$out" (see top link for the exact line)

it generates this:

fn get(name: &str) -> Option<&str> {
    match name {
        "development_fvm" => { Some
("5w7qgrls6xzbm5sczmfybbd3kfn69r2k-development_fvm")},
"development_parser_fbp_lexical" => { Some
("93nw3ygbkq2ms7kcmxqnqd36p9sam50a-development_parser_fbp_lexical")},
"development_parser_fbp_print_graph" => { Some
("7n8brg8s0zmc4r5c3dnzk98hm1azfm3v-development_parser_fbp_print_graph")},
"development_parser_fbp_semantic" => { Some
("w515c4k2p4xf11zsmv1hgfa99zsg46mv-development_parser_fbp_semantic")},
"file_open" => { Some ("rgx12nf2myagh5rvg6a6ij055cjs16lb-file_open")},
"file_print" => { Some ("53m297qjh9bsq7sl39fmc5am1dx3zkb0-file_print")},
"maths_boolean_nand" => { Some
("d0vn4c8mmlc2bxq05z3cbrpd5rp4w5p6-maths_boolean_nand")},
"maths_boolean_not" => { Some
("sb0zvb745y82k4r6f1rfh7v5mpx9hd0j-maths_boolean_not")},
"maths_number_add" => { Some
("h2kfzfa8wa0raf5y0dkqp5qcf55c9bqq-maths_number_add")},
"component_lookup" => { Some
("/nix/store/qfi08r60a06risivrr5rgmq7ng18w030-component_lookup")},
"contract_lookup" => { Some
("lc9vfh8jrv9ps2a141w45948hrckr6n7-contract_lookup")},
        _ => None,
    }
}

Please notice the "component_lookup" line, it has the /nix/store
prepended, the /nix/store/ shouldn't be there.

how do I get the output path of the component?

Thank you kindly
/sjm


More information about the nix-dev mailing list