Git Product home page Git Product logo

Comments (2)

hugosenari avatar hugosenari commented on June 3, 2024

Example:

{
  description = "virtual environments";

  inputs.devshell.url    = "github:numtide/devshell";
  inputs.flake-utils.url = "github:numtide/flake-utils";
  inputs.dsf.url         = "github:cruel-intentions/devshell-files";
  inputs.gha.url         = "github:cruel-intentions/gh-actions";

  outputs = { self, flake-utils, devshell, nixpkgs, dsf, gha }:
    flake-utils.lib.eachDefaultSystem (system: {
      devShell = let pkgs = import nixpkgs {  inherit system;   overlays = [ devshell.overlay ];   };   in
        pkgs.devshell.mkShell {
          imports = [
            "${dsf}/modules/files.nix" # create text files for you
            "${dsf}/modules/yaml.nix" # use files to write yaml files from nix
            "${gha}/gha/gh-actions.nix" # use yaml to create .github/workflows/gh-pages.yaml
            # ... :-)
            (pkgs.devshell.importTOML ./devshell.toml)
          ];
        };
    });
}

There is an external lib that help

{
  description = "Dev Environment";

  inputs.nixpkgs.url  = "github:nixos/nixpkgs/22.05";
  inputs.dsf.url      = "github:cruel-intentions/devshell-files";
  inputs.dsf.inputs.nixpkgs.follows = "nixpkgs";
  inputs.gha.url         = "github:cruel-intentions/gh-actions";

  outputs = inputs: inputs.dsf.lib.shell inputs [
    "hello"        # import nix package
    "${inputs.gha}/gh-actions.nix"
    ./project.nix  # import nix module
    (inputs.dsf.lib.importTOML ./devshell.toml)
  ];
}

See also #153

from devshell.

hugosenari avatar hugosenari commented on June 3, 2024

Looking at old issues, there is also #136

from devshell.

Related Issues (20)

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.