Code Monkey home page Code Monkey logo

Comments (4)

ivanceras avatar ivanceras commented on May 27, 2024 1

Dependency to rocket library(which relies on the nightly compiler) has now been removed. However, the project can't still be compiled with the nightly compiler due to the use of try_from. As soon as try_from feature is stabilized the project can then be built using the stable compiler. I think it would be enough time to have a usable build of the project.

from diwata.

ivanceras avatar ivanceras commented on May 27, 2024

Hi @rehno-lindeque , this needed the nightly compiler at the moment. Even if I try to use stable, the project relies on a library that also uses a nightly compiler such as rocket.

from diwata.

rehno-lindeque avatar rehno-lindeque commented on May 27, 2024

No worries, thanks for looking into it and interesting project. If you find it can compile on stable at some point ping me here and I'll try to look into it again.


For posterity, I didn't get around to figuring out how to build the webapp's assets but work could be continued from here:

{ stdenv, fetchFromGitHub, rustPlatform, elmPackages, closurecompiler, gnused, rsync, makeWrapper }:

rustPlatform.buildRustPackage rec {
  name = "diwata-${version}";
  version = "0.1.0";

  buildInputs = [ elmPackages.elm closurecompiler gnused rsync makeWrapper ];

  src = fetchFromGitHub {
    owner = "ivanceras";
    repo = "diwata";
    rev = "5f0293c3e22795314fbc11403f5d9ff5e4630225";
    sha256 = "0i40x2glz5zhwwx2j635i2vkma5kmrf9zzwa4ys7pprs6kj4z2nk";
    fetchSubmodules = true;
  };

  postInstall = ''
    mkdir -p $out/public
    substituteInPlace "webclient/compile.sh" \
        --replace "../public" "$out/public"
    substituteInPlace "webclient/compile_release.sh" \
        --replace "../public" "$out/public" \
        --replace "google-closure-compiler-js" "closure-compiler"
    cd webclient
    HOME=$out ELM_HOME=$out ./compile_release.sh
    wrapProgram $out/bin/diwata \
      --run "cd $out"
  '';

  cargoSha256 = "18zrj6fxn6pyllxrzkzy9qn1smbf6gwfyf8kdhr0389babkpaqcz";
  doCheck = false;

  meta = with stdenv.lib; {
    description = "A user-friendly database interface";
    homepage = https://github.com/ivanceras/diwata;
    license = licenses.apache;
    maintainers = [];
    platforms = platforms.all;
  };
}

Added this to my overlays to build with rustc nightly:

self: super:

let
  rustNightly = super.rust // rec {
    rustc = super.rust.rustc.override {
      configureFlags = [ "--release-channel=nightly" ];
      src = self.fetchurl {
        url = "https://static.rust-lang.org/dist/2018-03-01/rustc-1.24.1-src.tar.gz";
        sha256 = "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y";
      };
      doCheck = false;
    };

    cargo = super.cargo.override {
      inherit rustc;
    };
  };
in
{
  diwata = self.callPackage (import ./pkgs/diwata.nix) {
    rustPlatform = self.makeRustPlatform rustNightly;
  };

(apologies for the noise)

from diwata.

ivanceras avatar ivanceras commented on May 27, 2024

TryFrom has already been stablized, but the dependency of diwata which is sauron uses 2 new features that are behind the a feature flag. which are #![feature(arbitrary_self_types)] and #![cons_generics]. It will take a little more while before the project could use the stable compiler

from diwata.

Related Issues (15)

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.