Giter Site home page Giter Site logo

Create Nix package about atlas HOT 4 CLOSED

x80486 avatar x80486 commented on July 28, 2024
Create Nix package

from atlas.

Comments (4)

NotEvenANeko avatar NotEvenANeko commented on July 28, 2024 3

I just made the 0.12.0 of atlas package in my NUR, not sure if it works on Windows.

https://nur.nix-community.org/repos/notevenaneko/

from atlas.

NotEvenANeko avatar NotEvenANeko commented on July 28, 2024 1

@wlcx

You need modRoot = "cmd/atlas" to set the module root (compile cmd/atlas), and proxyVendor = true.

NixOS/nixpkgs#201531

But the unit tests need something like sed to replace the hardcoded Atlas CLI - development string and remove the logic for BSD sed in darwin because sed in stdenv is GNU sed for now.

from atlas.

wlcx avatar wlcx commented on July 28, 2024

Had a brief look at this today. The below nix derivation almost works, but go mod vendor (as used by nixos' buildGoModule) fails on release 0.12.0 due to an outdated go.sum. Looks like this is fixed on master, so should work next release.

As an aside, is there a reason for the slightly odd structure of this repo? As far as I can tell, due to the cmd/atlas subdirectory having its own go.mod / go.sum, it fetches itself (ariga.io/atlas) as a dependency (due to the imports for ariga.io/atlas/sql I guess?). It looks like the go workspace stuff (go.work, go.work.sum) perhaps addresses this, but I'm not very familar with go workspaces (and they seem under-documented in general...)

{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "atlas";
  version = "0.12.0";

  src = "${fetchFromGitHub {
    owner = "ariga";
    repo = "atlas";
    rev = "v${version}";
    hash = "sha256-BxTgIfqg5AFYvSqf4++wB2SBKEPW1TBC3mb9YpHM0Q4";
  }}/cmd/atlas";

  vendorHash = lib.fakeHash;

  meta = with lib; {
    description = "Database schema management and migration tool";
    longDescription = ''
      Atlas is a language-agnostic tool for managing and migrating
      database schemas using modern DevOps principles.
    '';
    homepage = "https://atlasgo.io";
    license = licenses.asl20;
    maintainers = with maintainers; [ samw ];
  };
}

from atlas.

x80486 avatar x80486 commented on July 28, 2024

Nix package is already available.

Would be great if you add this installation source in the (official) Atlas documentation.

from atlas.

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.