You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
description = "CLI tools used by the build system";
inputs = {
# Use the latest version of nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; # Adjust the version as needed
};
outputs = { self, nixpkgs }: let
system = "aarch64-linux"; # Use aarch64 for ARM architecture
pkgs = import nixpkgs { system = system; };
in {
# The default package
packages.${system} = {
default = pkgs.hello;
hello = pkgs.hello;
awscli2 = pkgs.awscli2;
curl = pkgs.curl;
cowsay = pkgs.cowsay;
};
# A development shell with the hello package available
devShells.${system}.default = pkgs.mkShell {
buildInputs = [ pkgs.hello pkgs.awscli2 pkgs.curl pkgs.cowsay ];
};
# Default application for testing
apps.${system}.default = {
type = "app";
program = "${pkgs.hello}/bin/hello";
};
};
}
I'm unable to actually get a genrule working that uses curl. It seems like the curl command is not under bin/curl, as is the case with the other cli's like hello and cowsay.
$ bazel run //tools/curl
INFO: Invocation ID: 27a89cae-2e4f-4ec8-b5fa-2a461deef854
ERROR: /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/mycurl/BUILD: no such target '@@mycurl//:bin/curl': target 'bin/curl' not declared in package '' defined by /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/mycurl/BUILD
ERROR: /workspaces/dd/tools/curl/BUILD.bazel:17:8: no such target '@@mycurl//:bin/curl': target 'bin/curl' not declared in package '' defined by /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/mycurl/BUILD and referenced by '//tools/curl:curl'
ERROR: Analysis of target '//tools/curl:curl' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.067s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
Consider this
flake.nix
:For some reason when I target the file like this:
I'm unable to actually get a genrule working that uses curl. It seems like the curl command is not under bin/curl, as is the case with the other cli's like hello and cowsay.
Here's the error I'm getting:
here's a clue as to what might be wrong:
I'm not sure if this is a problem with rules_nixpkgs or if curl is just not usable by rules_nixpkgs for some reason.
Tasks
The text was updated successfully, but these errors were encountered: