divnix / nosys Goto Github PK
View Code? Open in Web Editor NEWNo system, no hassle
No system, no hassle
nix-repl> p = nosys inputs ({disko, ...}: {inherit (disko) packages;})
nix-repl> p.packages.
p.packages.aarch64-darwin p.packages.x86_64-darwin
p.packages.aarch64-linux p.packages.x86_64-linux
nix-repl> p.packages.x86_64-darwin.x86_64-linux.
p.packages.x86_64-darwin.x86_64-linux.default
p.packages.x86_64-darwin.x86_64-linux.disko
If we don't strictly need it, I'd leave it out due to it introducing fixed point logic in the implementation and somehow that makes it even more magical than what it already is (actually not really that much, fortunately) ...
๐
while #4 is a correct fix, std.packages
aren't desystemized within f
:
Packages aren't hoisted:
nix-repl> p = inputs.nosys inputs ({std, ...}: {_std = std; inherit (std) _automation; packages = builtins.trace "${builtins.concat
StringsSep " - " (builtins.attrNames std.packages)}" std.packages;})
nix-repl> p.packages
{ aarch64-darwin = trace: aarch64-darwin - aarch64-linux - x86_64-darwin - x86_64-linux
{ ... }; aarch64-linux = trace: aarch64-darwin - aarch64-linux - x86_64-darwin - x86_64-linux
{ ... }; x86_64-darwin = trace: aarch64-darwin - aarch64-linux - x86_64-darwin - x86_64-linux
{ ... }; x86_64-linux = trace: aarch64-darwin - aarch64-linux - x86_64-darwin - x86_64-linux
{ ... }; }
Packages are still under their system:
nix-repl> p = inputs.nosys inputs ({std, ...}: {_std = std; inherit (std) _automation; packages = builtins.trace "${builtins.concat
StringsSep " - " (builtins.attrNames std.packages.x86_64-linux)}" std.packages;})
nix-repl> p.packages
{ aarch64-darwin = trace: adrgen - default - mdbook - mdbook-kroki-preprocessor
{ ... }; aarch64-linux = trace: adrgen - default - mdbook - mdbook-kroki-preprocessor
{ ... }; x86_64-darwin = trace: adrgen - default - mdbook - mdbook-kroki-preprocessor
{ ... }; x86_64-linux = trace: adrgen - default - mdbook - mdbook-kroki-preprocessor
{ ... }; }
My flake.nix and outputs.nix file look exactly like the README but with the additional nixpkgs
input for outputs.nix
. But I get the error
error: flake git+/path/to/folder does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'
Why is that the case? I do not understand the problem here. I thought nosys
provides the nixpkgs
instance for me.
#flake.nix
{
inputs.nosys.url = "github:divnix/nosys";
inputs.systems.url = "path:./flake/systems.nix";
inputs.systems.flake = false;
outputs = inputs @ {
nosys,
nixpkgs, # <---- This `nixpkgs` still has the `system` e.g. legacyPackages.${system}.zlib
...}: let
outputs = import ./flake/outputs.nix;
in
nosys inputs outputs;
}
# outputs.nix
{
self
, nixpkgs
, ...
}: let
inherit (nixpkgs.legacyPackages) pkgs;
in {
# system dependant outputs
devShells.default = self.devShells.dev;
devShells.dev = pkgs.mkShell {
buildInputs = with pkgs; [/* ... */];
};
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.