Giter Site home page Giter Site logo

Comments (4)

colemickens avatar colemickens commented on August 19, 2024

This does what I need:

packages.nix

let
  flake = (import (fetchTarball {
    url="https://github.com/edolstra/flake-compat/archive/c75e76f80c57784a6734356315b306140646ee84.tar.gz";
    sha256="071aal00zp2m9knnhddgr2wqzlx6i6qa1263lv1y7bdn2w20h10h";
  }) {
    src = builtins.fetchGit ./.;
  }).defaultNix;
in
  builtins.attrValues
    flake.packages."${builtins.currentSystem}"

from nix-build-uncached.

Mic92 avatar Mic92 commented on August 19, 2024

AFAICT the flakes docs don't work.

getFlake is only available when flakes is enabled, I don't think it works from nix-build, or at least I can't get it to.

I assume flake-compat will work? I'm going to try.

Yes. It assumes that your nix has flakes enabled. But than nix-build should also work.

from nix-build-uncached.

colemickens avatar colemickens commented on August 19, 2024

Weird, yeah, it works now and isn't complaining about getFlake working. (I really did enable flakes system-wide last night).

Well, anyway, I need this to work in CI where I don't think I have control over the daemon or don't want to mess with it, so I'll probably keep using this (being my flake-compat version) anyhow.

That having been said, this issue isn't valid afaict.

from nix-build-uncached.

Mic92 avatar Mic92 commented on August 19, 2024

There is a way to get flake-enabled nix version in CI: https://github.com/nix-community/nix-direnv/blob/master/.github/workflows/test.yml

from nix-build-uncached.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.