Comments (4)
Hi, try putting the dockerImage
attribute in the packages
attrs.
nix build .#dockerImages
looks in packages
and legacyPackages
only.
from flake-utils.
Your suggestion does make it work indeed.
But: when changing the above example to remove eachDefaultSystem
, nix build .#dockerImage
works just fine.
{
description = "dynastic - Static Site Server";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
flakeutils.url = "github:numtide/flake-utils";
naersk.url = "github:nmattia/naersk";
};
outputs = { self, nixpkgs, flakeutils, naersk }:
# flakeutils.lib.eachDefaultSystem (system:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
naersk-lib = naersk.lib."${system}";
in rec {
packages.dynastic = naersk-lib.buildPackage {
pname = "dynastic";
src = self;
root = ./.;
buildInputs = with pkgs; [
pkgconfig
];
propagatedBuildInputs = with pkgs; [
openssl
libgit2
];
runtimeDependencies = with pkgs; [
openssl
libgit2
];
};
defaultPackage = packages.dynastic;
apps.dynastic = flakeutils.lib.mkApp {
drv = packages.dynastic;
};
defaultApp = apps.dynastic;
devShell = pkgs.stdenv.mkDerivation {
name = "dynastic";
src = self;
buildInputs = with pkgs; [
pkgconfig
];
propagatedBuildInputs = with pkgs; [
openssl
libgit2
];
buildPhase = "";
installPhase = "";
RUST_BACKTRACE = "1";
RUSTFLAGS="-C link-arg=-fuse-ld=lld";
LD_LIBRARY_PATH="${pkgs.libgit2}/lib:${pkgs.openssl.out}/lib:${pkgs.sqlite.out}/lib";
};
dockerImage = pkgs.dockerTools.buildImage {
name = "theduke/dynastic:0.0.1";
config = {
Cmd = [ "${packages.dynastic}/bin/dynastic" ];
};
};
};
# );
}
from flake-utils.
I bet that .#dynastic
also stops working since it will look for it in packages.x86_64-linux.dynastic
. It's possible that flake has some other heuristics I am not aware of. The goal of eachDefaultSystem is just to automate converting prefix.foo
into prefix.${system}.foo
from flake-utils.
I don't think this is related to flake-utils
from flake-utils.
Related Issues (20)
- feat: Cut more releases
- by-name HOT 7
- Q: why does flattenTree rely on recurseIntoAttrs? HOT 4
- eachDefaultSystem leads to missing architecture attributes HOT 4
- simpleFlake to support defaultSystems HOT 2
- Outputs spec update makes `eachSystemMap` powerful HOT 2
- flake-utils.lib.mkApp is broken with nix 2.8 HOT 4
- move functions to nixpkgs HOT 2
- Use `meta.mainProgram` by default in `mkApp` HOT 4
- Request for Semantic Version Pinning HOT 1
- Request for Semantic Version Pinning HOT 1
- `flattenTree` cannot seem to flatten `legacyPackages` to a `packages`-compatible format HOT 5
- Should `filterPackages` check `meta.hydraPlatforms`? HOT 2
- nixops support HOT 4
- self parameter for eachSystem/eachDefaultSystem HOT 2
- single arch+os override flake HOT 15
- Potential feature-freeze or deprecation in favor of flake-parts HOT 2
- master rename to main breaks nix flake update HOT 3
- eachDefaultSystem docs are sorely missing a real example HOT 4
- This `flake.system.nix` approach... relies on a broken nix feature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flake-utils.